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:~#