Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 03-07-2008, 07:20 AM   #1
Registered: Apr 2002
Location: New York City
Distribution: Debian
Posts: 30

Rep: Reputation: 15
Managing users and group ownership and permissions


I am running a server running apache. I have created a directory for a website /websites/website01. All files in here must be owned by www-data. However, I wanted to allow some other users to edit and create files in this directory, so I created a group 'customer01-data', let's say. I changed ownership of all the files so that group ownership is 'customer01-data' and in this group user01, user02, user03 are members. This is fine and they are able to edit files so long as the file permissions are set right. However, when they create a new file, it defaults to being owned by user01:user01 and they are unable to change that. Is there a better way to handle this scenario? I did look at previous threads and did not see - though there was so much it is possible I missed something.

Old 03-07-2008, 09:29 AM   #2
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,402
Blog Entries: 1

Rep: Reputation: 64
At first look, if you change the primary group of user01, user02, user03 from default group user0n to the group customer01-data, then files will be created as user0n:customer01-data.
if their umask is 0002 or equivalent, files will be created as "rw-rw-r--" giving to the others members the permission to edit those files too.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing group ownership rayn0r Linux - Networking 1 11-28-2007 04:35 PM
granting permissions to a few users in a group grondar69 Linux - General 7 06-22-2006 06:51 PM
Group Permissions and Ownership of files and folders bugeyemonster Linux - General 1 04-19-2006 01:52 AM
Managing Users in RH 8.0 (user permissions syntax) kalis_dc Linux - Networking 1 09-28-2003 07:51 PM
changing users and group ownership dkc_ace Linux - General 4 02-03-2003 07:50 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration