LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-06-2008, 07:58 AM   #1
linuxmandrake
Member
 
Registered: Sep 2004
Distribution: debian sarge 64bit (AMD)
Posts: 709

Rep: Reputation: 30
user permissions changing after using gedit


Hi
I have a folder that's only supposed to be editable by it's owner and anyone belonging to the dev user group. Hence the folder and it's contents have 775 user permissions. But if you belong to the dev usergroup and edit files, the owner gets changed to the current user and the usergroup gets changed to the curren users default usergroup. Is there a way to stop this

I'm using ubuntu gutsy.

Last edited by linuxmandrake; 03-06-2008 at 08:00 AM.
 
Old 03-07-2008, 05:25 PM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Shouldn't 775 be rwxr-----

Last edited by alan_ri; 03-08-2008 at 05:45 AM. Reason: correction
 
Old 03-08-2008, 07:31 AM   #3
catweasel28
Member
 
Registered: Mar 2007
Location: United Kingdom
Distribution: Mint, OpenSUSE,Dream
Posts: 68

Rep: Reputation: 17
Exclamation Either.......Or

Actually what's happen is perfectly logical.
Permissions 775 is rwxrwxr-x, which means that not only the owner but anyone else in the owner's group can edit the file. When they save it, they become the owner. Also, do the files need to be executable. If not, open up a shell in the relevant directory and type:

sudo chmod 644 *

then run

ls -lh

You'll see all the file permissions as rw-r--r--

That way, only you'll be able to edit the files.
 
Old 03-08-2008, 07:47 AM   #4
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
It can not be 644 because then all the others could read it and the OP don't want that.
 
Old 03-08-2008, 07:53 AM   #5
catweasel28
Member
 
Registered: Mar 2007
Location: United Kingdom
Distribution: Mint, OpenSUSE,Dream
Posts: 68

Rep: Reputation: 17
Quote:
Originally Posted by alan_ri View Post
It can not be 644 because then all the others could read it and the OP don't want that.

If permissions are, as linuxmandrake says, 755 - then others can not only read but execute the files. If you don't want others to be able to do anything to the files, you'll have to issue:

sudo chmod 640 *

You'll then be safe from prying eyes!
 
Old 03-08-2008, 08:04 AM   #6
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by catweasel28 View Post
If you don't want others to be able to do anything to the files, you'll have to issue:

sudo chmod 640 *
Just what I said in my first post.
 
  


Reply


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
Giving user 'www-data' same permissions as normal user MikeOfAustin Linux - Software 5 06-08-2007 02:50 AM
how to stop admin-user changing file permissions Peter@KKVS Linux - Networking 1 11-10-2006 03:57 AM
Changing user permissions XAVeRY Linux - Newbie 2 02-09-2005 09:38 PM
Error when changing User permissions johnnyICON Linux - Newbie 1 10-01-2004 05:30 PM
Permissions Changing ew2003 Linux - Newbie 1 04-29-2003 04:30 PM


All times are GMT -5. The time now is 01:34 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration