Chmod not working

Hi,
I have looked all over the web but could not find the fix for my problem. I have been watching your channel on youtube for some time and enjoy them so I thought I would ask you.

I am running MX Linux as my Plex server and installed a new HDD and have it setup and running adding new movies on to it. I have noticed that the permission on that drive is 777 with root as owner which I want to change to 755. I have used sudo as well as su but it will not change. It doesn’t give any indication that there was a problem. What am I missing on this?

I used: $ sudo chmod 777 /media/Media

Thanks

Can you copy/paste the permissions when you do an ls -arl

First.

I think it should be
sudo chmod 755 /media/Media

This command only changes the directory permissions, not its content.

use

sudo chmod -R 755 /media/Media
To change the directory and everything inside it. If this is what you want.

Make sure “/media/Media” is really a directory and not symbolic link to a directory.

For example
Directory:
$ ls -ld /home
drwxr-xr-x 4 root root 4096 Dec 28 2018 /home

VS.
Link
ls -ld home
lrwxrwxrwx 1 user user 5 Oct 11 10:01 home -> /home

Make sure you change the directory permissions, not the link’s.

1 Like

cd up one directory “cd …/” then do chmod -R 755 media - does that help?

Since rootroot owns it, you should be root while doing it as well

If it is a symbolic link to the HDD then where do I go to change it. It is an internal HDD

So I went up one level and this is what happened.

Don’t forget the -R for recursive. (-R, --recursive change files and directories recursively)
chmod 755 dir -R

But i’ve never seen anything like that before :stuck_out_tongue: Tried a reboot in case something is buggy?

1 Like

Like @Ombratth said, reboot and look at it again. and definitely use the -R when doing the chmod 755

I added the -R and this is the result

I also rebooted

Have you tried to find just do a chmod on 1 file and not a directory? see if just happens with the directory. I’ve never used this distro, but are there any kind of GUI that might be the problem? Like open media vault has it’s own GUI that runs commands on the back end. Maby there is a setting that sets the permissions and owerwrites yours?

Have you tried the alphabetic way of doing it like chmod u+rw etc?

Here is a video I did for my students https://www.youtube.com/watch?v=oOtlZnKMMJc&lc=z23cz3ibkuaxzz12tacdp43aekiaax4s4chkelg3wmdw03c010c

I have tried the alpha

If plex server is using the folder in the drive for it’s library’s would that keep me from changing it?

Ok, I give up. It bugs me but I can live with it.
I did remove it from the plex library and rebooted. Tried changing it again but NO.

Thank you for your time and help.