LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Poll: Whick OS has the best way to store file access permissions?
Poll Options
Whick OS has the best way to store file access permissions?

You must log in and have one post to vote in this poll. If you don't have an account, you can register here.
Results will be available after the polls close.

The nominees are:

Linux
Windows (nt, xp, 2000)

Reply
 
Search this Thread
Old 03-22-2004, 08:21 AM   #1
dxdad
Member
 
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, 09:13 AM   #2
andrewlkho
Member
 
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, 09:45 AM   #3
dxdad
Member
 
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?
 
  


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


All times are GMT -5. The time now is 06:04 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration