Custom File Permissions - HELP
Posted: 10 Nov 2010, 08:16
Hi,
I've been customising the file system on my B3 and wanted to have a directory where the company files can be stored, but only accessible by certain users, so . . .
I have created 3 groups:
groupadd boss
groupadd office
groupadd employee
Then added each employee to their respective groups:
usermod -G boss,office,employee USERNAME
and so on, then have changed permissions on the folders:
chgrp -R boss /home/COMPANY/Level_One
chgrp -R office /home/COMPANY/Level_Two
chgrp -R employee /home/COMPANY/Level_Three
Then set permissions:
chmod -R 770 /home/COMPANY/
But for some reason I am unable to access the folder as any user at the moment, other than root?
Here is my code showing the groups and permissions, I'm unsure where I've gone wrong? Any idea's anyone?
Groups Installed:
root@main-bubba:/etc# more group
root
0:
daemon
1:
bin
2:
sys
3:
adm
4:
tty
5:
disk
6:
lp
7:
mail
8:
news
9:
uucp
10:
man
12:
proxy
13:
kmem
15:
dialout
20:
fax
21:
voice
22:
cdrom
24:
floppy
25:
tape
26:
sudo
27:
audio
29:
dip
30:
www-data
33:
backup
34:
operator
37:
list
38:
irc
39:
src
40:
gnats
41:
shadow
42:
utmp
43:
video
44:
sasl
45:
plugdev
46:
staff
50:
games
60:
users
100:admin
nogroup
65534:
libuuid
101:
crontab
102:
mysql
103:
ssl-cert
104:
postfix
105:
postdrop
106:
mediatomb
107:
ntp
108:
dovecot
109:
lpadmin
110:
ssh
111:
messagebus
112:
avahi
113:
netdev
114:
sambashare
115:
admin
1000:
boss
1001:chrisward,stevespicer
employee
1002:chrisward,stevespicer,lauramorrison,tomstephens,lukestephens,joe
henstridge
office
1003:chrisward,stevespicer,lauramorrison,joehenstridge
Permissions Print Outs:
root@main-bubba:/etc# ls -l /home
total 60
drwxrwx--- 5 root root 4096 Nov 9 16:43 COMPANY
drwxr-xr-x 2 admin admin 4096 Jan 20 2000 admin
drwxr-xr-x 4 chrisward users 4096 Nov 9 11:28 chrisward
drwxr-xr-x 5 joehenstridge users 4096 Nov 9 12:43 joehenstridge
drwxr-xr-x 4 lauramorrison users 4096 Nov 9 11:28 lauramorrison
drwxr-xr-x 2 root root 16384 Jan 20 2000 lost+found
drwxr-xr-x 4 lukestephens users 4096 Nov 9 11:29 lukestephens
drwxr-xr-x 7 main-user users 4096 Nov 5 19:52 main-user
drwxr-xr-x 4 stevespicer users 4096 Nov 9 11:28 stevespicer
drwxr-sr-x 10 root users 4096 Nov 8 22:56 storage
drwxr-xr-x 4 tomstephens users 4096 Nov 9 11:29 tomstephens
drwxr-sr-x 2 root users 4096 Jan 20 2000 web
root@main-bubba:~# ls -l /home/COMPANY
total 12
drwxrwx--- 2 root boss 4096 Nov 9 16:42 Level_One
drwxrwx--- 2 root employee 4096 Nov 9 16:43 Level_Three
drwxrwx--- 2 root office 4096 Nov 9 16:42 Level_Two
root@main-bubba:~#
I've been customising the file system on my B3 and wanted to have a directory where the company files can be stored, but only accessible by certain users, so . . .
I have created 3 groups:
groupadd boss
groupadd office
groupadd employee
Then added each employee to their respective groups:
usermod -G boss,office,employee USERNAME
and so on, then have changed permissions on the folders:
chgrp -R boss /home/COMPANY/Level_One
chgrp -R office /home/COMPANY/Level_Two
chgrp -R employee /home/COMPANY/Level_Three
Then set permissions:
chmod -R 770 /home/COMPANY/
But for some reason I am unable to access the folder as any user at the moment, other than root?
Here is my code showing the groups and permissions, I'm unsure where I've gone wrong? Any idea's anyone?
Groups Installed:
root@main-bubba:/etc# more group
root
daemon
bin
sys
adm
tty
disk
lp
news
uucp
man
proxy
kmem
dialout
fax
voice
cdrom
floppy
tape
sudo
audio
dip
www-data
backup
operator
list
irc
src
gnats
shadow
utmp
video
sasl
plugdev
staff
games
users
nogroup
libuuid
crontab
mysql
ssl-cert
postfix
postdrop
mediatomb
ntp
dovecot
lpadmin
ssh
messagebus
avahi
netdev
sambashare
admin
boss
employee
henstridge
office
Permissions Print Outs:
root@main-bubba:/etc# ls -l /home
total 60
drwxrwx--- 5 root root 4096 Nov 9 16:43 COMPANY
drwxr-xr-x 2 admin admin 4096 Jan 20 2000 admin
drwxr-xr-x 4 chrisward users 4096 Nov 9 11:28 chrisward
drwxr-xr-x 5 joehenstridge users 4096 Nov 9 12:43 joehenstridge
drwxr-xr-x 4 lauramorrison users 4096 Nov 9 11:28 lauramorrison
drwxr-xr-x 2 root root 16384 Jan 20 2000 lost+found
drwxr-xr-x 4 lukestephens users 4096 Nov 9 11:29 lukestephens
drwxr-xr-x 7 main-user users 4096 Nov 5 19:52 main-user
drwxr-xr-x 4 stevespicer users 4096 Nov 9 11:28 stevespicer
drwxr-sr-x 10 root users 4096 Nov 8 22:56 storage
drwxr-xr-x 4 tomstephens users 4096 Nov 9 11:29 tomstephens
drwxr-sr-x 2 root users 4096 Jan 20 2000 web
root@main-bubba:~# ls -l /home/COMPANY
total 12
drwxrwx--- 2 root boss 4096 Nov 9 16:42 Level_One
drwxrwx--- 2 root employee 4096 Nov 9 16:43 Level_Three
drwxrwx--- 2 root office 4096 Nov 9 16:42 Level_Two
root@main-bubba:~#