Originally Posted by
kgatan
Automatically have a read only public folder mounted in each new users home folder linked to a folder on the teachers desktop/home.
When new accounts are created, the home directories are based on the contents of /etc/skel. So if you place a symlink to the shared directory in /etc/skel, it will automatically appear in each new account.
Code:
cd /etc/skel
sudo ln -s /path/to/the/shared/directory
You need to control access on the folder itself. If you want to give the teachers write access to the folder, you should create a group for them and set the permissions on the shared folder to grant write access to the group.
Code:
sudo groupadd teachers
sudo useradd --gid teachers teacher1
cd /path/to/the/shared
sudo chmod 775 directory
That creates a "teachers" group, then creates a new user "teacher1" with primary group "teachers". The last two lines grant full privileges on the shared directory to the folder's owner and to the teachers group, but only read-only privileges to everyone else.
Bookmarks