User avatar
VascoFerraz
Posts: 83
Joined: Thu Aug 30, 2012 11:54 am

How to create the /media/pi folder with correct permissions?

Thu Aug 31, 2017 9:33 am

Hi,

I accidentally removed the pi folder in the media folder.

I noticed that (on another box) the pi folder has the following permissions: drwxr-x---+

If I create this folder I don't get the "+" sign. How can I restore the folder with the correct permissions?

Thanks.
Vasco Ferraz

User avatar
Paeryn
Posts: 2966
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: How to create the /media/pi folder with correct permissions?

Thu Aug 31, 2017 11:01 am

The + after the permissions means there are extended permissions via ACL (access control list). They can be shown with getfacl and set with setfacl
It allows giving permissions to specific users. This is because /media/pi belongs to root but you want to give user pi access but nobody else.

/media/pi on my rpi has r-x set specifially for the user pi. You can do this with

Code: Select all

sudo setfacl -m "u:pi:r-x" /media/pi
She who travels light — forgot something.

User avatar
VascoFerraz
Posts: 83
Joined: Thu Aug 30, 2012 11:54 am

Re: How to create the /media/pi folder with correct permissions?

Thu Aug 31, 2017 11:54 am

Thank you so much
Vasco Ferraz

Return to “Advanced users”