Changing file permissions on upload

Hello !

When I connect to a RH FTP server, the files I transfer (from my "windows computer") to this server have the following permissions : -rw------- but I would like those files to have the following permissions : - rw-rw-r-x
How can I do that ??? :slight_smile:

Thanks for your help !
G.

I dont know what kind of ftp server RH uses but serach for umask or defaultmask and the name of the ftpd that you are using on www.google.com

hope that helps

/Peter

Login to your Red Hat server and set your umask in your shell rc to 112. I think that'll work.

Maybe this thread will help.

Thanks for your help Perderabo, it helped ! :slight_smile:

Just one thing. I'd like to set the '---------x' attribute to the files so that images uploaded to the server can be accessible to the web server but I don't think I can do that with umask...
Does anybody know about that ?

Thanks a lot !
:slight_smile:

That's right, you won't be to set an execute bit via umask (on a non-directory) unless you modify the code for your ftp server. Files are created with 666 and umask can only stop some or all of those bits. It can't add new bits.

Perhaps you can get the ftp client to issue explicit chmod commands.

On our RH 9

 /etc/vsftpd/vsftpd.conf 

allows you to tweak-up ftp...