w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Shared directory in linux server

A bit about the Linux permissions:

ls -lah
drwx------  2 username groupname 4.0K Feb 17 21:34 filename

drwx----- gives you information about the permissions on a file/folder

d meaning it is a folder then its 3 characters for user,group and others

d{rwx} meaning that the user 'username' in this case has read write and execute permissions d{rwx}{rw} for example would mean that the group 'groupname' would have read/write permissions.

Knowing this you can make a folder and assign permissions:

mkdir public_folder
chmod g+rw public_folder

This will changemod group and give it read/write permissions, you can also use o+rw to give others (everyone) read/write permissions. But from a security perspective you might want to put the users in a group and give that group permission

chgrp yourgroupname public_folder

Will change the group to 'yourgroupname'

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.