How to create a shared folder for a group of users on Debian Linux.

Posted: June 18, 2013. At: 7:39 PM. This was 4 years ago. Post ID: 5833

How to create a shared folder on a Linux machine that a group of users may access. This is very useful for a shared folder that many users may place files.

Firstly; you need to create a folder in the /opt directory.

[email protected]:/opt# mkdir sharedfiles

Then you need to set the proper permissions on the shared folder.

[email protected]:/opt# chmod 775 sharedfiles

After that, create a user group to add all of the users to.

[email protected]:/opt# groupadd employees

Once you have done that, set the group ownership of the sharedfiles directory.

[email protected]:/opt# chgrp employees sharedfiles/

After all of that the folder should look like this. This is a good way to share files among users on a shared Linux system. This gives write access to the members of the group, but read only access for other users.

root@neo:/opt# ls -hula
total 12K
drwxr-xr-x  3 root root      4.0K Jun 18  2013 .
drwxr-xr-x 24 root root      4.0K Jun 18  2013 ..
drwxrwxr-x  2 root employees 4.0K Jun 18 19:08 sharedfiles

That is how easy it is to create a shared folder on Linux. Much easier than messing around with NTFS permissions on Windows Server 2008. That is a nightmare.

No comments have been made. Use this form to start the conversation :)

Leave a Reply