Operating System - Linux
1752383 Members
5860 Online
108788 Solutions
New Discussion юеВ

HP OO Sendmail with Attachment does not work

 
SOLVED
Go to solution
Shaik Abdul Gafoor
Occasional Advisor

HP OO Sendmail with Attachment does not work

HP OO Sendmail with Attachment does not work.

I am trying to send an email through HP-OO with an attachment, but it always throws java.io.FileNotFoundException : /home/handson/TaskList.txt (Permission denied), though I gave 777 rights on this file, still the same error.
3 REPLIES 3
Matti_Kurkela
Honored Contributor
Solution

Re: HP OO Sendmail with Attachment does not work

Please try to examine the problem. If your first solution to permission problems is "give 777 rights to everything", your systems will always fail a security audit.

Please run this command and examine the output:
ls -ld /home/handson/TaskList.txt /home/handson /home /

To allow the user running HP-OO to read /home/handson/TaskList.txt, the required minimum permissions are:

- directory access permission (x) on /
- directory access permission (x) on /home
- directory access permission (x) on /home/handson
- file read permission (r) on /home/handson/TaskList.txt

If any of those permissions are not granted to this user, the attempt to read TaskList.txt will fail.

If the user running HP-OO is the same as the user who owns /home/handson (by default, that would be the user named "handson"), you could use "user" permissions.

If it isn't the same user, but both users belong to the same group _and_ the group ownership of the directories/files are set to that group, you can use "group" permissions.

Otherwise, the "other" permissions should be used, with care.

My guess is: the directory /home/handson probably has overly strict permissions. That can be fixed with:

chmod a+x /home/handson

Please fix the permissions of the TaskList.txt file. Having files that are both writeable and executable by anyone is a security risk to your system.

MK
MK
Shaik Abdul Gafoor
Occasional Advisor

Re: HP OO Sendmail with Attachment does not work

Thankyou very much.
Directory permissions was an issue.

Appreciate your help.
Shaik Abdul Gafoor
Occasional Advisor

Re: HP OO Sendmail with Attachment does not work

The issue was that though the file had permission, the directory holding the file did not.