LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   chmod (https://www.linuxquestions.org/questions/linux-general-1/chmod-13843/)

Atroxic 02-08-2002 02:46 PM

chmod
 
Here's the scenario:
A few of my friends and I are working on a mud. We'd each like our own logins, but when it comes time to compile, the Makefile uses "chmod g+w", which to my understanding is a command that is only to be entered by the files' owner. Since we can't have more than one owner for a file, we keep having to switch to one person's account. Is there a way to get around this?

-Atroxic

dorward 02-08-2002 04:22 PM

g+w is add write for members of owning group.

e.g.

chown dorward.mylittlegroup myfile
chmod g+w myfile
adduser dorward mylittlegroup
adduser bob mylittlegroup

Now bob and dorward can both edit the file.

Atroxic 02-08-2002 07:31 PM

Could you give a little better of an explanation on this? Like, who initially owns the file? And adduser doesn't work unless the user doesn't exist and I'm creating it, so how would that help? I already have the users created, and they're in a group called coders.

-Atroxic

dorward 02-08-2002 08:18 PM

adduser existingusername somegroup

would add the existingusername to somegroup.

As the group exists already and the people are members you can:


chmod 664 filename
chown username.coders filename

Atroxic 02-08-2002 08:46 PM

It just keeps telling me this:
adduser: user atroxic exists

That's all it allows me to do.

-Atroxic

dorward 02-09-2002 04:57 AM

That would suggest your adduser script works in a different way to mine. You could edit you /etc/group file manually.

groupname:x:groupnumber:user1,user2,user3


All times are GMT -5. The time now is 03:57 AM.