my chmod doesn’t work properly.
I just reinstalled my manjaro distro (formated only the root, non the /home).
This folder resides on a ntfs partition (I already have ntfs-3g installed), I only need to set my user as proprietary of this folder:
~/backup ❯ ls -al
totale 4
drwxr-xr-x 1 root users 0 13 ago 10.08 .
drwxr-xr-x 1 root users 4096 13 ago 11.32 ..
Then I change permissions inside
~/backup ❯ sudo chown -R $USER .
But this is the result again:
~/backup ❯ ls -al
totale 4
drwxr-xr-x 1 root users 0 13 ago 10.08 .
drwxr-xr-x 1 root users 4096 13 ago 11.32 ..
~/backup ❯
Do you guys have any idea?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Windows and Linux have a very different user and permissions model that is incompatible. For either chmod or chown to work, the file system needs to support users and permissions in a Linux-like way. NTFS is a Windows file system and so these commands can’t possibly work.
One thing you can do is to mount the NTFS partition specifying a different user and mode for all of the files / directories:
mount -o uid=userid,gid=groupid,dmask=022,fmask=133 /path/to/disk /mnt
This will mount with specified user and group giving directories mode 755 and files mode 644.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0