33

sorry fresh user. I installed about 9 days ago and had issues with Unity disappearing which took 5 days of headaches to fix. It never did fix, I reinstalled.

I set up Plex (media server) and while the server is running and can be accessed by external network devices, I can't add files. Plex says this is because of permissions. I have gone up and down the forums here and at Plex to get an answer. It seems everyone says

chmod -R 755 /media/My\ Book/Videos

will change permissions to allow the folder "Videos" on my external USB 2.0 NTFS 3TB Western Digital drive (which is mounted and accessible through the file manager) as well as every sub-directory and file contained therein to be accessible to user "Plex".

I have used file manager and as soon as you click to change permissions it changes right back. When I chmod with -c it tells me every file is changed (usually 600) to 755 as I commanded it to do. I did

ls -l

to verify and there is no change. (I also used ls -l to make sure I knew who the owner was and it is me (mvl1014). ls -al gives me the same info.)

I swear to god I tried to sudo it and after smashing my head against this keyboard for basically the entirety of my day, I tried it as root. I was scared shi-less but couldn't come up with anything else. sudo su to root and then chmod -R -c /media/My\ Book/Videos

Same result. -c told me every single file was changed and a check in Unity or in terminal confirmed not a darn thing changed.

Now it seems to me that even if that isn't the thing stopping Plex from working there is still a problem with this command not going through.

12.04LTS -- on gen 1 i7 (2.7 GHz I believe) with 6 GB ram

I've attempted to attach a screenshot but I'm told I need 10 reps to do so, which means I'm copy/pasting too.

Please excuse my obfuscation, but Lorem Ipsum seemed unnecessary. And I tried multiple ways to format this but it looks perfect every way and messed up each time in the preview below. (Ugh, I'm a mess.)

$ chmod -R -c 755 /media/My\ Book/Videos 
..... 
..... 
..... 
mode of `/media/My Book/Videos/xxxx/xxxx/xxxx.mkv' changed from 0600 (rw-------) to 0755 (rwxr-xr-x) 

ls -al shows:

mvl1014@FX6800:/media/My Book/Videos$ ls -al 

total 88 
drwx------ 1 mvl1014 mvl1014     0 Aug 28 15:17 .  
drwx------ 1 mvl1014 mvl1014 20480 Sep  3 14:29 .. 
drwx------ 1 mvl1014 mvl1014  8192 Aug 28 15:18 xxxx
drwx------ 1 mvl1014 mvl1014 49152 Aug 16 14:02 xxxx
drwx------ 1 mvl1014 mvl1014  8192 Aug 27 21:36 xxxx
drwx------ 1 mvl1014 mvl1014  4096 Jul 23 19:09 xxxx

I apologize if this has been asked. I looked through this place plus at all the suggested "Similar Questions". The closet thing I got to an answer was here, but running the provided code with my own UID didn't work either.

mvl1014
  • 651
  • 1
  • 7
  • 9
  • 3
    Using chmod on a Windows file system (also known as NTFS) will not work. Linux permissions will only work on a Linux file system (aka ext4, ext3, btrfs, etc). What you need to do is chmod only the mount point (My\ Book in your case) - sudo chmod 755 /media/My\ Book. Once that is done, files under My\ Book should inherit its permissions. – mikewhatever Sep 08 '13 at 05:34
  • Thanks for the comment @mikewhatever. I tried this on both the USB drive mentioned and even a mounted partition and neither worked. So I used the -R with the -c and it went through all 2.5ish TB of data and "changed permissions"--or at least told me so. It acted the same way as before, including when I tried to use the GUI option. – mvl1014 Sep 08 '13 at 12:43
  • "I tried this on both the USB drive mentioned and even a mounted partition...". That's your mistake. Again, you only need to chmod the mount point, not the partition or the "USB drive". – mikewhatever Sep 08 '13 at 13:19
  • @mikewhatever I have searched "mount point" but only got to automatically mounting, which had me edit the fstab. This resulted in my creating a folder that turned out to be owned by root so I can't do anything to the folder, making it essentially the exact opposite of what I was trying to accomplish. So clearly I don't understand this concept. :( Can you point to me where I can learn to chmod the mount point, not the actual device,folder,file,etc that I seem to be doing? – mvl1014 Sep 08 '13 at 16:00
  • Yes, editing fstab and creating a folder is the way to go. That folder you've created is the mount point, and you need to chmod just it. So, disconnect the USB hard drive, then run sudo chmod 755 /path_to that_folder. Now, connect the device and see what happens. In case it doesn't automount, run sudo mount -a. – mikewhatever Sep 08 '13 at 16:39
  • @mikewhatever Thanks for your help. I needed to look into your comment a bit more. In doing so, I found the answer spelled out for me. So I linked to it and answered it below for others. – mvl1014 Sep 09 '13 at 02:33
  • 1

1 Answers1

32

Solved!

The answer was found here.

sudo -i gedit /etc/fstab

Add the next line as (if you don't know your UUID do a sudo blkid)

UUID=12102C02102CEB83 /media/Store ntfs-3g auto,users,permissions 0 0

Save it and close the file.

If you need to make the directory, which I did

sudo mkdir /media/Store

Then

sudo mount /media/Store

Finally (whatever permissions you want to set)

chmod 755 -R /media/Store

And then make it your own

chown <username> -R /media/Store

Yeah, that took me like 8-10 hours over 2 days to get. And "Store" is for "Storage" :-P

mchid
  • 43,546
  • 8
  • 97
  • 150
mvl1014
  • 651
  • 1
  • 7
  • 9
  • 2
    should it not be chmod 755 /media/Store? and chown username /media/Store? – deanresin Jul 01 '16 at 21:34
  • 1
    The -R allows the permissions to change recursively for whats inside the /media/Store – Willoczy Jul 19 '16 at 04:42
  • 1
    gksu is deprecated and is removed from Debian, Ubuntu 18.04 forward. Instead, replace "gksu gedit " with "gedit admin://" (So there will be three "/" in a row in the command.) – Henrik May 17 '20 at 13:04