Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


View Poll Results: Whick OS has the best way to store file access permissions?
Linux 1 50.00%
Windows (nt, xp, 2000) 1 50.00%
Voters: 2. You may not vote on this poll

  Search this Thread
Old 03-22-2004, 07:21 AM   #1
Registered: Aug 2003
Distribution: Slackware
Posts: 75

Rep: Reputation: 15
Question Changing GID in X

Suppose my username is "paul" and I am in, by default, group "users". But i'm also in group "test". I'd like to edit a file with permissions : rw-rw-r-- and the file is owned by test:test

I'm unable to edit the file (I can read it but not write to it) unless I switch to group "test". On a console I can do: "sg test" and I will be able to edit it. But how can I do that in X? If I want to use kate to edit it can I only do this by starting konsol (or similar) and "sg"ing and then starting kate from there? Or is there and easier way? I can't help but feel this is the thing that lets down linux. In windows you can set as many users as you like to be able to access a file, but in linux only one user, one group and "everyone else".

Any help would be much appriciated.
Old 03-22-2004, 08:13 AM   #2
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
Despite the fact that I can't come up with a quick way to do what you want, I still find chmod and chown far more intuitive (especially when combined with an 'ls -l') than the windows way of doing file permissions, which hides it in an incredibly obscure way.

Although the other let-down I find of the linux file permissions system is the fact that if you want to make your entire /home/$USER partition, for example, just 600, you quickly come up with a problem that although you can access the files as you would expect, you can't do an 'ls' or anything inside a directory, because the directory itself has to be 'executable' for this.
Anyway got any ideas on how to fix this with one command [eg how to chmod recursively differently, depending on whether it's a file or a directory[?
Old 03-22-2004, 08:45 AM   #3
Registered: Aug 2003
Distribution: Slackware
Posts: 75

Original Poster
Rep: Reputation: 15
Oh, yes, I'd have to say the windows way is a pain to get to and alter, I just like being able to have many users able to access certain files in different ways.

the actual thing I want to do is: The files for the webserver are owned by apache:apache. They need to have the group "apache" so that php scripts running via the webserver can alter files as needed. And yet I don't want to log in as "apache" so i need to be in the group "apache" so I can modify/delete etc.

Maybe I'm just doing things rather awkwardly and other people have a more logical way to do it.

As for your problem I can't help. I always assumed if the directory as readable you could "ls" in it. Maybe you can use ls to recursivly list just the names of diectorys and somehow pipe each line of the output to chmod ? <- maybe that's just me trying to do something not possible?


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
what is uid and gid rmanocha Linux - Software 9 08-18-2008 11:03 PM
What is my uid/gid? Jeebizz Slackware 2 11-22-2005 11:39 AM
Changing GID within a wrapper sharky Linux - General 0 08-16-2004 12:13 PM
changing uid, gid zeke1955 Linux - General 4 01-09-2004 11:53 PM
Does Win98 know the GID w/out ACL? calabash Linux - Networking 0 12-08-2003 12:45 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:52 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