Operating System - Linux
1826428 Members
3391 Online
109692 Solutions
New Discussion

Re: Configuring VSFTPD file upload permission to 755

 
Chan Choth PUTH
Advisor

Configuring VSFTPD file upload permission to 755

 
Sharing IT knowledge and Information
4 REPLIES 4
U.SivaKumar_2
Honored Contributor

Re: Configuring VSFTPD file upload permission to 755

Dear Chan ,

Edit vsftpd.conf and put this line
local_umask=022

Restart vsftpd daemon. Hope your problem is solved.

regards,

U.SivaKumar


Innovations are made when conventions are broken
Chan Choth PUTH
Advisor

Re: Configuring VSFTPD file upload permission to 755

Dear U.SivaKumar,

I have already editted vsftpd.conf and put this line
local_umask=022 and restart vsftpd by using /etc/rc.d/inetd restart. But the permission that I get is 644. How can I configured vsftpd to set the permission to 755? I would like all my files and directories that I upload are 755.

Regards,

Chan Choth
Sharing IT knowledge and Information
Steven E. Protter
Exalted Contributor

Re: Configuring VSFTPD file upload permission to 755

local_umask

Actually, you can figure this out yourself.

From the manual of umask

For example, the mask u=rwx,g=rx,o=rx (022) disables group and other write permissions. As a result, files normally created with a file
mode shown by the ls -l command as -rwxrwxrwx (777) become mode -rwxr-xr-x (755); while files created with file mode -rw-rw-rw- (666)
become mode -rw-r--r-- (644).

In fact the umask you were given is correct.

The problem is umask can't doesn't make a file executable.

There may be another parameter you can set.

Here is a workaround.


write a cron job

It checks for new files in the ftp directory.

If it finds a new file, it does this.

chmod 755 filename.

I don't know the ftp server you are using, though red hat and my backup server both user it.

just a bad guess, local_chmod 755 ?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Chan Choth PUTH
Advisor

Re: Configuring VSFTPD file upload permission to 755

Dear Steven,

How can I write a script to check for new files in the ftp directory and chmod them to 755?

Many thanks,

Chan Choth
Sharing IT knowledge and Information