Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chmod a freshly mounted external drive to set up writing access

I have mounted a external drive at:

# mkdir /mnt/external

and subsequently:

mkdir -p /mnt/external
mount /dev/sdb1 /mnt/external

Now only the root-user has access to write to these folders.

linux-wyee:/home/martin # dir /mnt
drwxr-xr-x 2 root root 4096 13. Dez 22:01 external

How to change this - how to change that all can write to the external drive. I need to change the permissions within the terminal.

chmod 777 /dev/sdb1 /mnt/external or something alike -
like image 986
zero Avatar asked Dec 14 '13 13:12

zero


People also ask

What does chmod 777 mean?

The command chmod -R 777 / makes every single file on the system under / (root) have rwxrwxrwx permissions. This is equivalent to allowing ALL users read/write/execute permissions.

How do I change the read/write permissions on my external hard drive?

Navigate to the Security tab, in the middle of the Properties window; you'll see 'To change permissions, click Edit'. This is where you can change read/write permission on the target disk. So, click "Edit", and the Security window immediately pops out.

How do I get permission to write on my hard drive?

Select the drive letter for the external HDD and right-click on it to choose Properties. Choose the Security tab from the Properties window. After that, click on the Edit button to make changes in the permissions. On the next screen, you will a section called Permissions for Authenticated Users.

What is 755 chmod?

When you perform chmod 755 filename command you allow everyone to read and execute the file, the owner is allowed to write to the file as well. So, there should be no permission to everyone else other than the owner to write to the file, 755 permission is required.


1 Answers

Try this first,

umount /dev/sdb1

chmod -R 0777 /mnt/external   

then mount with

mount /dev/sdb1 /mnt/external

or try

chmod -R 0777 /mnt/external
like image 169
Balaji Perumal Avatar answered Oct 14 '22 15:10

Balaji Perumal