Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
setting group permissions in reiserfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
reaz82
Apprentice
Apprentice


Joined: 14 Mar 2003
Posts: 203
Location: Austin, Texas

PostPosted: Sat Feb 04, 2006 9:14 pm    Post subject: setting group permissions in reiserfs Reply with quote

I am trying to mount a few partitions as readable/writeable by all members of the group "users".

The line in my fstab is as follows:

Code:
/dev/hda2               /mnt/audio      reiserfs        notail,noatime,gid=users    0 0


However, when I try to mount using this command:

Code:
mount /mnt/audio


I get the following error:

Code:


mount: wrong fs type, bad option, bad superblock on /dev/hda2,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


if i do a "dmesg | tail" as per their instruction I get the following:

ReiserFS: hda2: warning: unknown mount option "umask=0000"
ReiserFS: hda2: warning: unknown mount option "umask=0000"
ReiserFS: hda2: warning: unknown mount option "gid=100"
ReiserFS: hda2: warning: unknown mount option "gid=100"
ReiserFS: hda2: warning: unknown mount option "gid=100"
ReiserFS: hda2: warning: unknown mount option "gid=100"


As you can see in italics I also had the same issue with the umask option. And I bolded the part that is
an easier method to achieve the same results but that does not work as well. However, when I remove
the gid or umask option the partitions are mounted properly with the undesired permissions ofcourse.

I'm not sure where I've gone wrong but I hope someone can help me out.


Last edited by reaz82 on Mon Feb 06, 2006 4:05 am; edited 2 times in total
Back to top
View user's profile Send private message
gentleman
Tux's lil' helper
Tux's lil' helper


Joined: 02 Dec 2005
Posts: 140
Location: Germany, Paderborn

PostPosted: Sat Feb 04, 2006 9:40 pm    Post subject: Reply with quote

Well the error says that gid=?? is an unknown option and so does the mount manual, too. By the way: users is no id, but a name. I wonder if that might be a problem, too. As a solution for you problem just do it like that:

Code:
/dev/hda2               /mnt/audio      reiserfs        notail,noatime,users    0 0


That should work.
Back to top
View user's profile Send private message
reaz82
Apprentice
Apprentice


Joined: 14 Mar 2003
Posts: 203
Location: Austin, Texas

PostPosted: Sun Feb 05, 2006 6:34 am    Post subject: Reply with quote

gentleman wrote:
Well the error says that gid=?? is an unknown option and so does the mount manual, too. By the way: users is no id, but a name. I wonder if that might be a problem, too. As a solution for you problem just do it like that:

Code:
/dev/hda2               /mnt/audio      reiserfs        notail,noatime,users    0 0


That should work.


users translates to id number 100 on my system.

I tried this other method and it only grants read/execute access and not write access. I need both.
Back to top
View user's profile Send private message
reaz82
Apprentice
Apprentice


Joined: 14 Mar 2003
Posts: 203
Location: Austin, Texas

PostPosted: Sun Feb 05, 2006 3:25 pm    Post subject: Reply with quote

anyone?

I'd like to grant read/write/execute permissions to the user group for that partition. So far I can give read/execute writes.
Back to top
View user's profile Send private message
sirtalon42
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2005
Posts: 79

PostPosted: Sun Feb 05, 2006 9:57 pm    Post subject: Reply with quote

What it seems like to me is that since reiserfs supports the normal user/group/other permissions it doesn't also accept gid/uid (since that would screw up the permissions). What probably would work is mount it like normal (i.e. without gid or uid), then change the owner to root (or some other user), and group "users". If theres a directory tree on it you may also need to chown all the subdirectories and files. After you do that change the permissions to give the group read/write access.

I think 'gid' and 'uid' are only for filesystems that aren't meant for multiuser systems (like iso9660 and vfat), or ones where the permission systems are incompatible with Linux (like ntfs).
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Sun Feb 05, 2006 10:06 pm    Post subject: Reply with quote

You might also want to add sticky to the group of the parent directory so that any file created will be read/write to the group.

chris
Back to top
View user's profile Send private message
reaz82
Apprentice
Apprentice


Joined: 14 Mar 2003
Posts: 203
Location: Austin, Texas

PostPosted: Mon Feb 06, 2006 3:03 am    Post subject: Reply with quote

sirtalon42 wrote:
What it seems like to me is that since reiserfs supports the normal user/group/other permissions it doesn't also accept gid/uid (since that would screw up the permissions). What probably would work is mount it like normal (i.e. without gid or uid), then change the owner to root (or some other user), and group "users". If theres a directory tree on it you may also need to chown all the subdirectories and files. After you do that change the permissions to give the group read/write access.

I think 'gid' and 'uid' are only for filesystems that aren't meant for multiuser systems (like iso9660 and vfat), or ones where the permission systems are incompatible with Linux (like ntfs).


Thanks a lot. This makes sense. I'll give it a try.
Back to top
View user's profile Send private message
reaz82
Apprentice
Apprentice


Joined: 14 Mar 2003
Posts: 203
Location: Austin, Texas

PostPosted: Mon Feb 06, 2006 3:08 am    Post subject: Reply with quote

ctford0 wrote:
You might also want to add sticky to the group of the parent directory so that any file created will be read/write to the group.

chris


how do you do this? I am not sure which command I can use.. chmod?
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Mon Feb 06, 2006 3:31 am    Post subject: Reply with quote

reaz82 wrote:


how do you do this? I am not sure which command I can use.. chmod?


From man chmod:

The letters `rwxXstugo' select the new permissions for the affected users: read (r), write (w),
execute (or access for directories) (x), execute only if the file is a directory or already has
execute permission for some user (X), set user or group ID on execution (s), sticky bit (t), the
permissions that the user who owns the file currently has for it (u), the permissions that other
users in the file's group have for it (g), and the permissions that other users not in the
file's group have for it (o). (Thus, `chmod g-s file' removes the set-group-ID bit, `chmod ug+s
file' sets both the set-user-ID and set-group-ID bits, while `chmod o+s file' does nothing.)


The name of the `sticky bit' derives from the original meaning: keep program text on swap
device. These days, when set for a directory, it means that only the owner of the file and the
owner of that directory may remove the file from that directory. (This is commonly used on
directories like /tmp that have general write permission.)


I think you'll want to do:

Code:

chmod g+s somedir


to set the sticky for that directory.

chris
Back to top
View user's profile Send private message
reaz82
Apprentice
Apprentice


Joined: 14 Mar 2003
Posts: 203
Location: Austin, Texas

PostPosted: Mon Feb 06, 2006 4:01 am    Post subject: Reply with quote

nope. it's not working. I made a mistake. the chmod g+s command does nothing as far as making all the directories/files writeable.
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Tue Feb 07, 2006 4:00 am    Post subject: Reply with quote

reaz82 wrote:
nope. it's not working. I made a mistake. the chmod g+s command does nothing as far as making all the directories/files writeable.


1. Can you post the permissons on the directory that you are mounting?

2. All the sticky bit does is ensure that all the files that are placed in the folder have the same permissions so everyone can read and write to them that are in the group that has access to the directory.

chris
Back to top
View user's profile Send private message
reaz82
Apprentice
Apprentice


Joined: 14 Mar 2003
Posts: 203
Location: Austin, Texas

PostPosted: Sat Feb 11, 2006 12:57 am    Post subject: Reply with quote

ctford0 wrote:
reaz82 wrote:
nope. it's not working. I made a mistake. the chmod g+s command does nothing as far as making all the directories/files writeable.


1. Can you post the permissons on the directory that you are mounting?

2. All the sticky bit does is ensure that all the files that are placed in the folder have the same permissions so everyone can read and write to them that are in the group that has access to the directory.

chris


I see. It's working now. I set the permissions and things look fine now. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum