cancel
Showing results for 
Search instead for 
Did you mean: 

File Permission

 
SOLVED
Go to solution
Narendra Uttekar
Regular Advisor

File Permission

Hi,
I have created one directory /SID/backup and this directory is used for uploading the FTP files. When i use the HP-UX id to FTP the files into /SID/backup directory the file permission are rw-r----- and my requirement is that the file permission should be when files are FTP into this directory to be rw-rw-rw- Please let me know what i need to modify so that whenever i FTP the files will have rw-rw-rw- permission.

Thanks,
Narendra
6 REPLIES
Johnson Punniyalingam
Honored Contributor

Re: File Permission

you need change "umask" value for "HP-UX id" which you are using to ftp files to /SID/backup


Hope the below link will give better understanding.

http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

Problems are common to all, but attitude makes the difference
Horia Chirculescu
Honored Contributor
Solution

Re: File Permission

You must enable the use of ftpaccess by adding in /etc/inetd.conf the -a switch (read manual pages of ftpd)

The you should add in the ftpaccess file an upload definition for the SID/backup directory, which will set a disired umask value.

Read

man ftpaccess

If you want to globally change the umask (for all the files uploaded into your ftpd server, you could do it by adding -u when enabling ftpd in /etc/inetd.conf.

Do not forget to restart inetd.

Horia.
Best regards from Romania,
Horia.
Johnson Punniyalingam
Honored Contributor

Re: File Permission

Login HP_UX id

#ls -la
# cp -p .profile .profile.org -> backup
# vi .profile
umask 111 --> type umaks value
:wq

verification:-

touch HPUX_id.txt -> create file to check file permission are shown (rw-rw-rw)
or just type "umask" command will current umask value settings
Problems are common to all, but attitude makes the difference

Re: File Permission

You may also be able to use the ftp chmod command to change the permissions for each file.
Arturo Galbiati
Esteemed Contributor

Re: File Permission

Hi,
into the .profile for the user put
umask 000
this will set permission rw-rw-rw- for new files.

HTH,
Art
Narendra Uttekar
Regular Advisor

Re: File Permission

Thanks Horia for the excellent solution.