1

I have just gone from WD10 to Ubuntu 16.10 (Dual Boot on two separate hard drives) on my Desktop and I am just wondering why all my files and folders on my external hard drive and secondary hard drive have 777

What is recommended RWX permission and how to do it on every file and folder in one commmand and not do it manually for every file?

Asaf M
  • 291
Xaner4
  • 11
  • The recommended permissions for storage devices are least restrictive by default - 777. If you have reasons to change it, use the chmod command recursively, man chmod for more info. – mikewhatever Apr 01 '17 at 08:41
  • 1
    What file system is there on the external drive? In linux, Microsoft file systems (FAT and NTFS) get their permissions when mounted, and if you want to change them, you should unmount the drive and mount it with other permissions. But it is most convenient to have 'full' permissions, otherwise some operations will not work. The same can be said about ownership (which user ID, that owns the files and directories). Linux can manage linux file systems better, and set permissions and ownership individually for files and directories. – sudodus Apr 01 '17 at 08:57

1 Answers1

0

Lets assume your device is /media/username/thedevice to apply the permissions to all files and folders you would do:

sudo chmod 777 -R /media/username/thedevice

A real example is a external HDD that I have in /media/luis/backups and to avoid all permission related issues I would do:

sudo chmod 777 -R /media/luis/backups

Now if the file system is not ext4 or linux based but it is for example NTFS (Specially NTFS) I recommend solutions like:

How to correctly fix a "dirty" NTFS partition without using chkdsk

Cannot write permissions NTFS partitions

Luis Alvarado
  • 211,503