FTP permissions on linux

Posted on 2007-10-10
Last Modified: 2013-12-16
I need to figure out how to change FTP default permissions:

When I upload to our webserver it goes as:  -rwxr-xr-x user:user

I tried to change the default group for the user, but to no avail. I'm running Red Hat Enterprise 3.

i want it to go as: -rwxrwx--- (770) for user:group

any ideas to point me in the right direction - i keep getting very unhelpful google results.
Question by:chuckbeats
    LVL 4

    Assisted Solution

    chmod 770 <file or directory>

    chown user:group <directory or file>
    LVL 14

    Expert Comment

    This is something that you'll need to set either at the system level or the FTP server software. What FTP software are you running (vsftpd, proftpd, etc)?  What you're looking for is the umask.
    LVL 30

    Expert Comment

    by:Kerem ERSOY

    RH ES 3 would use VsFtp. j1et edit the configuration file /etc/vsvtp/vsftp.conf. Locate the line
    umask 022

    change it to:
    umask 007

    save and exit
    restart your ftpd service


    Author Comment

    Thats fine and works, but it still does not allow me to upload as user:group - it uploads as user:user - i think it may be a case of me not changing the primary group correctly
    LVL 14

    Assisted Solution

    Thats correct.  It isn't really user:user, its still user:group, it just so happens that the group is named the same thing as the user.   Just issue a "usermod -g group user" to change the primary group of the user.
    LVL 30

    Accepted Solution

    the default bahaviour when creating a user in RedHAT is also to create a group with the same name as user so when I define a user called blah it is autmatically assigned to the group blah.

    To change this you need to use the command:
    usermod -g common_group user
    but then the home of this user will be owned by user:user. to modify this you'd need to issue this command

    chown -R user:common_group /home/user/*

    This will adjust your user to what you want, a common group for all users that need to share this information.
    LVL 4

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Are end users causing IT problems again?

    You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

    Suggested Solutions

    Title # Comments Views Activity
    IPA client Config problems 2 53
    Cron jobs 12 63
    Redirect mail server from IP to IP 2 44
    Open Camera IP 8 64
    Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now