change folder permissions
#1
I wanted to change permissions on my external drives that are mounted however I have tried by sudo nautilus and then going to gui and permissions and changing it however it does not let me.

I ran the ls -l and get
drwx------ 1 xbmc xbmc

the gui shows below.


owner xbmc
folder access create and delete files
file access ---

Group xbmc
folder access none
file access ---

others
folder access none
file access ---

how can I change it so that everyone has permission to access the drive and folders/files inside of it. I am trying to get plexmedia server running and I cant see my drives via the webpage to add it to my source.
Nvidia Shield with Kodi 18
Reply
#2
sudo chmod -R 777 directory
Reply
#3
didnt work. did not change the permissions. I want to change the permissions I assume for the "others" to access/read/write all my drives that are mounted in /media along with all their directories/folders/files.
Nvidia Shield with Kodi 18
Reply
#4
rflores2323 Wrote:didnt work. did not change the permissions. I want to change the permissions I assume for the "others" to access/read/write all my drives that are mounted in /media along with all their directories/folders/files.


sudo -i
chown -R xbmc:xbmc /directory
exit


would change all files in the main directory and all subdirectories
to owner xbmc and group xbmc

sudo chmod -R 777 /directory
would make all files read/write and executable for all users.
In a world without walls and fences who needs windows and gates, open source, opens minds, so open yours today.

Image
Reply
#5
rflores2323 Wrote:didnt work. did not change the permissions. I want to change the permissions I assume for the "others" to access/read/write all my drives that are mounted in /media along with all their directories/folders/files.

Hi there:

I had the same problem with some of my external drives, so see if this helps you. I could not set those permissions via chmod command because those external disks are fat32. In such case chmod will not work. You will need to set your permissions via /etc/fstab on mount, using parameters uid, gid, dmask and fmask.

Take a look at your entry in /etc/fstab for each of your disks and change it to something like (all in the same line):

device-to-mount path-to-be-mounted-in uid=1000,gid=1000,dmask=0000,fmask=0000,defaults 0 2

With this line you will set the following upon mount:
  • ownership of all mounted files and directories to user "1000" (you can find the uid by typing command "id -u username").
  • group of all mounted files and directories to group "1000" (you can find the gid of all groups by typing command "cat /etc/group").
  • dmask (permissions for all directories) and fmask (permissions for all files) are somehow tricky, for they work exactly the opposite as usual. So that means that if you want full access for everybody, instead of 777 you need to use 000. So, for instance imagine you want rwxrw-r--. That means you need to assign 764. To do so using dmask or fmask parameters, you need to substract 777-764=013 (say fmask=013 will end with all your mounted files with rwxrw-r-- permissions on mount).

Hope this helps. I'm no linux expert, but those were my findings.
Reply

Logout Mark Read Team Forum Stats Members Help
change folder permissions0