LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-03-2008, 10:40 PM   #1
Drokare
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Rep: Reputation: 0
Group Permissions not working when using WinSCP


I have a linux server that a group of Developers use for our Webpage.

I created a Group called dev and all the developers are in this group, I also made sure the dev was the default group in the /etc/passwd for those users.

I made sure that the all the files in the directory have the group set to dev and I made sure the files all had rw for the group. I have also made sure the default umask in the /etc/bashrc is set to 002 so that any new file created is automatically set to group dev and the rights default to rw-rw---.

Now I am on my Windows machine I use WinSCP to remote into the server, I drill down to the directory /var/www/html/ and copy over a file I modified locally, if the user is set to me, no problems, but if the user is set to another, I get access denied. yet I am a member of the dev group and the file has rw-rw---- so group has permission.

Am I missing something? Also the server is Fedora 5.

Thanks in advance..
 
Old 04-03-2008, 11:36 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
What are the permissions on the directory where the files are being placed? It should belong to the dev group as well and the permissions should be rws - you may need to run chmod g+ws /var/www/html

There's also some useful info on directory permissions here
 
Old 04-08-2008, 02:38 AM   #3
Drokare
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Question Overrighting????

I think I may have found the issue, as the files themselves are owned by individuals. When overwriting the files it deletes the old one then creates the new one, and even though they are members of the group that have rwx(read, write, execute) on the files, the OS will not allow another group member to delete the file, only modify it...

At least that seems to be the issue I am seeing.

For example. User joe is a member of Group dev and User rob and bob are also members of Group dev.

joe has created a number of files for a website.

so we have the following;

/var/www/html/website
All the files in the website directory have the following rights;
-rw-rwxr-- joe dev about.html
-rw-rwxr-- joe dev contact.html
-rw-rwxr-- joe dev index.html

And the Directory has website has the following rights;
drwxrwxr-x joe dev website

Now bob has updated the the index.html, contact.html, and about.html. He has sftp into the linux server and attempts to overright the existing files, now he will get Access Denied. Even though bob is in the dev group and under the /etc/passwd his default group is dev.

So if bob creates a new file in the website, this from using sftp or I guess I should say copying a new file into the server these are the permissions that are shown when doing a ls -al

-rw-rwxr-- joe dev about.html
-rw-rwxr-- joe dev contact.html
-rw-rwxr-- joe dev index.html
-rw-rwxr-- bob dev test.html

As you can see the default group is dev for bob also and the dev group has full access to all the files in this directory.

I just can not find out how to get around this???? the only idea is to create another user that is ownership of the website files and we developers have to login as that user to overright/update the pages, but to track changes this makes more of a pain to see who actually made the changes for auditing or whatever....

I really hope this makes more sense.... and someone can explain why the group can not make the necessary changes. At this time we need to ssh in and chown the files to who ever is needing to update the files then use the sftp to place them on there. Then the next developer if they have made newer changes needs to then chown the files to him so he can make the changes. Problem is we have three developers that are not linux savvy, I and the other have to make the changes first for them in there directories they are working in....

There has to be something I am missing.
 
  


Reply



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
Group permissions flamingvan Linux - Newbie 4 10-18-2006 11:11 AM
group permissions towel401 Linux - Newbie 5 12-06-2005 05:19 AM
group permissions nanjil SUSE / openSUSE 4 10-20-2005 01:51 PM
group permissions mikeghet Linux - Newbie 1 12-06-2004 03:49 AM
Group Permissions (m9.2) PaladinCowboy75 Mandriva 4 05-06-2004 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:20 AM.

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