Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ftp permission problem

Status
Not open for further replies.

arvibm

Vendor
Feb 6, 2003
115
IN
Hi,

I have created a user opm on aix server and my requirement is opm user has to login to server after a time intervals of 1 hour and opm user creates a file on server process it through some application running on server and then ftp the created file on local machine.User modifies the file on its local machine and ftp the file again to server on same path.
i want the permission of file which opm user creates on server to be automatically assigned as 777 and the permission should not be changed when user put back the modified file back to server on its original path.
to solve this problem i have added umask 000 value in users .profile file , but when user creates a file the permission is rw to all(users,groups and others).
when user put back the modified file on its original path after removing the file from server the permission changes to rw to user and only read permissions to groups and others.
what i have to do to give the full permissions to file which the opm user creates?why the permissions changes when user put back the file from local machine to server?why i am not getting execute permissions to users ,group and others even after setting a umask value 000 in .profile file.??

Regards

arvibm
 
arvibm,
umask never sets file execute bits, you must use chmod for this to happen.
-Hallux
 
Hi Hallux,

Is there any other method instead of using chmod through which i can give full permissions to file created by user.why i am not getting execute permisssions using umask.defining the umask parameter in .profile of user should override the default umask value for that particular user.


Regards

arvibm
 
arvibm,

It's a security feature that umask never sets execute bits. The idea is that requiring any person or process that wants an executable file to explicitly set the permissions is better than the alternative, which is allowing the possibility that a person or process that DOES NOT want to create an executable could create one by default.

The reason your permissions are different (read only for group and other) after the second ftp is that the .profile file is not sourced for an ftp login.

If your user has access to the AIX machine to run the application that creates the file, why not add a post-ftp chmod "application" for them?



Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top