System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP dir/file Permission issue

ROCK_10
Advisor

SFTP dir/file Permission issue


Hi All,

A user complaints me whenever he is creating directory its permission get set to 750. He requested to change his permission from 750 to 770 , i check his profile and found that he is a FTP user only.

Please let me know how can i change its permission setting so that whenever he creates any file or directory the permission should be 770.

Below is the o/p for his /etc/passwd and .profile

ftpftp:x:109:209:ftp id:/home/ftp/ftpftp:/bin/false

# more .profile
# This is the default standard profile provided to a user.
# They are expected to edit it to meet their own needs.

MAIL=/usr/mail/${LOGNAME:?}
umask 007




1 REPLY
Johnson Punniyalingam
Honored Contributor

Re: SFTP dir/file Permission issue

A reasonable value for UMASK is 022, which will cause files to be created with permissions of 644 (rw-r--r--) and directories to be created with permissions of 755 (rwxr-xr-x).

A more secure value for UMASK is 066, which will cause files to be created with permissions of 600 (rw-------) and directories to be created with permissions of 700 (rwx------).

how To calculate permissions which will result from specific UMASK values, subtract the UMASK from 666 for files and from 777 for directories.

Thanks,
Johnson

Problems are common to all, but attitude makes the difference