[Last Call] Learn how to a build a cloud-first strategyRegister Now


FTP permissions on linux

Posted on 2007-10-10
Medium Priority
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
  • 2
  • 2
  • 2
  • +1

Assisted Solution

pstrawser earned 672 total points
ID: 20050358
chmod 770 <file or directory>

chown user:group <directory or file>
LVL 14

Expert Comment

ID: 20051060
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
ID: 20051890

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 20060677
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

arrkerr1024 earned 672 total points
ID: 20060838
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

Kerem ERSOY earned 672 total points
ID: 20061038
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.

Expert Comment

ID: 20106268

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month17 days, 17 hours left to enroll

830 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