LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-25-2005, 12:51 AM   #1
rsheridan6
Member
 
Registered: Mar 2003
Location: Kansas City
Distribution: Debian unstable
Posts: 57

Rep: Reputation: 22
Confusion about permissions


I'm trying to set a directory so that members of a certain group can write to it, so I can add myself to the group and write to it without either chowning the directory to myself or making it world-writable. So why doesn't this work?


rps@sausage:/usr/local/etc$ ls -lh
total 0
drwxr-sr-x 2 root staff 80 May 24 18:05 kahua
rps@sausage:/usr/local/etc$ groups rps
rps : rps cdrom audio kahua
rps@sausage:/usr/local/etc$ sudo chgrp kahua kahua
rps@sausage:/usr/local/etc$ touch kahua/foo
touch: cannot touch `kahua/foo': Permission denied
rps@sausage:/usr/local/etc$ ls -lh
total 0
drwxr-sr-x 2 root kahua 80 May 24 18:05 kahua
rps@sausage:/usr/local/etc$
 
Old 05-25-2005, 02:49 AM   #2
bnj
Member
 
Registered: Apr 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 70

Rep: Reputation: 16
Hi,

your directory kahua is not writable by people in the group. It is only writable by the root.

type
Code:
chmod 775 kahua
to make it writable also by people in the group kahua.
 
Old 05-25-2005, 03:35 AM   #3
kees-jan
Member
 
Registered: Sep 2004
Distribution: Debian, Ubuntu, BeatrIX, OpenWRT
Posts: 273

Rep: Reputation: 30
That will make the directory writable by people in group kahua, but files created will not be automatically owned by group kahua.

Try either
Code:
chmod g+w kahua
to add group write permission or
Code:
chmod 2775 kahua
to specify all permissions at once

Groetjes,

Kees-Jan
 
Old 05-25-2005, 03:46 AM   #4
bnj
Member
 
Registered: Apr 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 70

Rep: Reputation: 16
What is this 2 that you are adding before the 775? What does it do?
I like the name of your distribution "BeatrIX". No need to specify that you are from the Netherlands :-)

Last edited by bnj; 05-25-2005 at 03:47 AM.
 
Old 05-25-2005, 04:15 AM   #5
kees-jan
Member
 
Registered: Sep 2004
Distribution: Debian, Ubuntu, BeatrIX, OpenWRT
Posts: 273

Rep: Reputation: 30
Hi,

The two specifies the directory to be "set group id". For directories, this means that anything created in that directory will have the same group as the parent directory.

The directory of the original poster had already its set-group-id bit set (permissions read drwxr-sr-x, note the s), and your command would have removed that.

Actually, BeatrIX is created by someone from the Czech republic, who named it after his cat, which, in turn, is named after our queen. So the relation between the distribution and the country is somewhat accidental. Nevertheless, it is a nice distribution :-)

Groetjes,

Kees-Jan
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
a little confusion..... b0nd Linux - Newbie 1 02-17-2005 06:45 AM
Module Confusion rhb327 Slackware 1 10-24-2004 04:50 PM
proftp confusion teacup Linux - Networking 5 08-20-2003 03:00 AM
WM Confusion phoeniXflame Slackware 3 02-16-2003 05:19 AM
Some confusion about RH 7.3 psyklops Linux - Distributions 2 05-08-2002 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:44 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
Open Source Consulting | Domain Registration