Setting Default File Permission For FTP & SSH

Discussion in 'Installation/Configuration' started by asyadiqin, Feb 3, 2007.

  1. asyadiqin

    asyadiqin New Member

    Hi all,

    I have a Fedora Core 5 server running ProFTP and SSH. Currently, any files uploaded to the server either by FTP or SSH is given a default permission of 644.

    How can I change this so that the default file permission is 664.

    Please provide detailed instruction is possible, eg. files to modify, etc...

    Thanks and hopefully someone can help me.
  2. falko

    falko Super Moderator ISPConfig Developer

    In /etc/proftpd.conf there is a Umask setting. Change this from 022 to 002 and restart Proftpd.
  3. asyadiqin

    asyadiqin New Member

    Thanks falko.

    How about changing the default permission for those files uploaded via SSH or SFTP, eg. those using softwares like WinSCP, etc....

    Any ideas where I set the permission similar FTP, eg. 664.

    Thanks again.
  4. falko

    falko Super Moderator ISPConfig Developer

    I'm not sure. Maybe you can set this in WinSCP?
  5. asyadiqin

    asyadiqin New Member

    The reason that I do not wish to set the file permission on the client level is basically I do not know what client my users might be using and it will be a tedious task to tell everyone to configure whatever client program they are using to set it to umask 002.

    Therefore, it would be ideal if I could set it as default at the server level.

    I managed to set the default umask using the commandline

    However, if the server is restarted, it defaulted back to 0022. So, I was wondering where the server gets its default umask value, ie. 0022.
  6. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    The default is set in /etc/profile. You can change to your likes, but be careful. It also impacts e.g. the creation of directories. It may leave directories more open than you really want .....
  7. kchopein

    kchopein New Member

    User's profile?


    I'm an Ubuntu user, so I'm not sure if this works in Fedora too, but there it goes!
    You can have a .profile file for each user and there you can define custom umask, so it will affect only that user.

    Hope this helps!!

Share This Page