Skip to content
June 29, 2012 / doganay

CHANGING PERMISSIONS at SPECIFIC USER LEVEL (SETFACL, GETFACL)

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

## You can give permission to a user:
## 4:read 2:write 1:execute
setfacl -r -m user:myuser:4 myfile

## clear permissions:
setfacl -d user:myuser:4 myfile

## set permissions of files that will be created in a specific directory:
setfacl -m d:u::rwx,d:g::r-x,d:u:myuser:r-x,d:m:r-x,d:o:—,user:myuser:r-x mydirectory
## or
setfacl -r -m default:user:myuser:r-x,default:user::rwx,default:group::r-x,default:mask:r-x,default:other:— mydirectory


		
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: