How do I set read/write permissions my hard drives?

Solution 1:

for your 500 GB hard-drive (ext4) filesystem, you need to give the write and execute permission on /media/username/your_drive partition:-

sudo chmod ugo+wx /media/username/your_drive

Brief Explanation:-

sudo :- it will elevate your priviledges to execute the command.

chmod:- command to change the permissions

u :- user

g:- group

o :- other

/media/username/your_drive :- partition

For your NTFS partition please follow fossfreedom's advice.

Hope this is helpful.

Solution 2:

If you don't mind the security problems you can do a recursive chmod in order to change the permissions of all the files.

cd /media/your_external_drive
sudo chmod -R -v 777 *

Also if your files were created in another OS like windows they will have different ownership you can do the same as above to change the ownership of the files

cd /media/your_external_drive
sudo chown -R -v your_username:your_username *

Thats the way I solved a similar problem for my friend after migrating from windows and also after migrating from Linux Mint to Ubuntu.

Solution 3:

To fix read/write issue ntfs, just install these packages:

sudo apt-get install ntfs-config ntfs-3g

when installed, in the dash, type in and run: ntfs-config enter your password when prompted, and then you can enjoy read/write support for ntfs file systems.

Solution 4:

Don't mark all your files as executable as some answers suggest. Use 755 for directories and 644 for files. This will set the x bit for directories in order to list their contents but not for files.

find /path/to/drive \( -type d -exec chmod 0755 -- {} + \) -o \( -type f -exec chmod 0644 -- {} + \)

Link to the original answer on StackOverflow: How to set chmod for a folder and all of its subfolders and files in Linux Ubuntu Terminal?.

Solution 5:

I had the same problem and solved it with nautilus as root.

if nautilus is not installed:

sudo apt-get install nautilus

Before running nautilus make sure the partition or hard disk is mounted.

Run nautilus as root with

sudo nautilus

Your partition or hard disk should appear on the left.

Right click on it -> select "Properties"

In the new window that appears, select the "Permissions" tab. From here you can change the owner if you need to, as well as the permission for a certain user, root, or others.