Linux: chcon to change security context (to solve permissions problems with mounted shares)
On my Fedora server I was creating some shared folders that I could mount from my other machines.
So I created a Samba share, and chmod-ed the directories.
From my other machine I mounted a share and all seemed swell -- that is, until I tried to add a file. It kept telling me I didn't have sufficient permissions. Finally I figured out that chmod-ing was not enough, and that I had to change the context of the directory on the linux server:
chcon -R -t samba_share_t /path/to/share
I could then add files from the remote machine! Phew.
To get more info on the 'chcon' (change context) command, run 'info chcon'
Save This Page