I want to set the permissions of the target folder to 777
Clash Royale CLAN TAG#URR8PPP
up vote
-1
down vote
favorite
I am using ubuntu 18.04.
I will mount SD, USB to a specific folder.
I want 777 permissions for that mounted folder.
However, after mounting, the permissions will be reset.
I want to know how to set permissions of mounted folder to 777.
root@mount-test:/work/test# pwd
/work/test
root@mount-test:/work/test#
root@mount-test:/work/test# whoami
root
root@mount-test:/work/test#
root@mount-test:/work/test# ls
root@mount-test:/work/test# ls -al
Total 8
drwxr-xr-x 2 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
root@mount-test:/work/test#
root@mount-test:/work/test# mkdir mnt
root@mount-test:/work/test# ls -al
Total 12
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxr-xr-x 2 root root 4096 6ì 22 13:43 mnt
root@mount-test:/work/test#
root@mount-test:/work/test# chmod 777 mnt
root@mount-test:/work/test# ls -al
Total 12
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxrwxrwx 2 root root 4096 6ì 22 13:43 mnt
root@mount-test:/work/test#
root@mount-test:/work/test#
root@mount-test:/work/test# ls /dev/sdb*
/dev/sdb /dev/sdb1
root@mount-test:/work/test#
root@mount-test:/work/test# mount /dev/sdb1 mnt
root@mount-test:/work/test# ls -al
Total 24
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxr-xr-x 12 root root 16384 1ì 1 1970 mnt
root@mount-test:/work/test#
permissions mount
add a comment |Â
up vote
-1
down vote
favorite
I am using ubuntu 18.04.
I will mount SD, USB to a specific folder.
I want 777 permissions for that mounted folder.
However, after mounting, the permissions will be reset.
I want to know how to set permissions of mounted folder to 777.
root@mount-test:/work/test# pwd
/work/test
root@mount-test:/work/test#
root@mount-test:/work/test# whoami
root
root@mount-test:/work/test#
root@mount-test:/work/test# ls
root@mount-test:/work/test# ls -al
Total 8
drwxr-xr-x 2 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
root@mount-test:/work/test#
root@mount-test:/work/test# mkdir mnt
root@mount-test:/work/test# ls -al
Total 12
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxr-xr-x 2 root root 4096 6ì 22 13:43 mnt
root@mount-test:/work/test#
root@mount-test:/work/test# chmod 777 mnt
root@mount-test:/work/test# ls -al
Total 12
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxrwxrwx 2 root root 4096 6ì 22 13:43 mnt
root@mount-test:/work/test#
root@mount-test:/work/test#
root@mount-test:/work/test# ls /dev/sdb*
/dev/sdb /dev/sdb1
root@mount-test:/work/test#
root@mount-test:/work/test# mount /dev/sdb1 mnt
root@mount-test:/work/test# ls -al
Total 24
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxr-xr-x 12 root root 16384 1ì 1 1970 mnt
root@mount-test:/work/test#
permissions mount
2
777 - ? you nearly never want this :) also write your mount in fstab file, but don't forget to put some small timeout so the system don't hang when it's not mounted
â Drako
Jun 22 at 5:57
2
1. You do not need 777. 2. Change permissions AFTER mount.
â Romeo Ninov
Jun 22 at 6:02
add a comment |Â
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I am using ubuntu 18.04.
I will mount SD, USB to a specific folder.
I want 777 permissions for that mounted folder.
However, after mounting, the permissions will be reset.
I want to know how to set permissions of mounted folder to 777.
root@mount-test:/work/test# pwd
/work/test
root@mount-test:/work/test#
root@mount-test:/work/test# whoami
root
root@mount-test:/work/test#
root@mount-test:/work/test# ls
root@mount-test:/work/test# ls -al
Total 8
drwxr-xr-x 2 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
root@mount-test:/work/test#
root@mount-test:/work/test# mkdir mnt
root@mount-test:/work/test# ls -al
Total 12
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxr-xr-x 2 root root 4096 6ì 22 13:43 mnt
root@mount-test:/work/test#
root@mount-test:/work/test# chmod 777 mnt
root@mount-test:/work/test# ls -al
Total 12
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxrwxrwx 2 root root 4096 6ì 22 13:43 mnt
root@mount-test:/work/test#
root@mount-test:/work/test#
root@mount-test:/work/test# ls /dev/sdb*
/dev/sdb /dev/sdb1
root@mount-test:/work/test#
root@mount-test:/work/test# mount /dev/sdb1 mnt
root@mount-test:/work/test# ls -al
Total 24
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxr-xr-x 12 root root 16384 1ì 1 1970 mnt
root@mount-test:/work/test#
permissions mount
I am using ubuntu 18.04.
I will mount SD, USB to a specific folder.
I want 777 permissions for that mounted folder.
However, after mounting, the permissions will be reset.
I want to know how to set permissions of mounted folder to 777.
root@mount-test:/work/test# pwd
/work/test
root@mount-test:/work/test#
root@mount-test:/work/test# whoami
root
root@mount-test:/work/test#
root@mount-test:/work/test# ls
root@mount-test:/work/test# ls -al
Total 8
drwxr-xr-x 2 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
root@mount-test:/work/test#
root@mount-test:/work/test# mkdir mnt
root@mount-test:/work/test# ls -al
Total 12
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxr-xr-x 2 root root 4096 6ì 22 13:43 mnt
root@mount-test:/work/test#
root@mount-test:/work/test# chmod 777 mnt
root@mount-test:/work/test# ls -al
Total 12
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxrwxrwx 2 root root 4096 6ì 22 13:43 mnt
root@mount-test:/work/test#
root@mount-test:/work/test#
root@mount-test:/work/test# ls /dev/sdb*
/dev/sdb /dev/sdb1
root@mount-test:/work/test#
root@mount-test:/work/test# mount /dev/sdb1 mnt
root@mount-test:/work/test# ls -al
Total 24
drwxr-xr-x 3 root root 4096 6ì 22 13:43 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxr-xr-x 12 root root 16384 1ì 1 1970 mnt
root@mount-test:/work/test#
permissions mount
asked Jun 22 at 5:36
DonBit
329214
329214
2
777 - ? you nearly never want this :) also write your mount in fstab file, but don't forget to put some small timeout so the system don't hang when it's not mounted
â Drako
Jun 22 at 5:57
2
1. You do not need 777. 2. Change permissions AFTER mount.
â Romeo Ninov
Jun 22 at 6:02
add a comment |Â
2
777 - ? you nearly never want this :) also write your mount in fstab file, but don't forget to put some small timeout so the system don't hang when it's not mounted
â Drako
Jun 22 at 5:57
2
1. You do not need 777. 2. Change permissions AFTER mount.
â Romeo Ninov
Jun 22 at 6:02
2
2
777 - ? you nearly never want this :) also write your mount in fstab file, but don't forget to put some small timeout so the system don't hang when it's not mounted
â Drako
Jun 22 at 5:57
777 - ? you nearly never want this :) also write your mount in fstab file, but don't forget to put some small timeout so the system don't hang when it's not mounted
â Drako
Jun 22 at 5:57
2
2
1. You do not need 777. 2. Change permissions AFTER mount.
â Romeo Ninov
Jun 22 at 6:02
1. You do not need 777. 2. Change permissions AFTER mount.
â Romeo Ninov
Jun 22 at 6:02
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
I solved it by using the umask
option of the mount
command.
root@mount-test:/work/test# ls -al
Total 8
drwxr-xr-x 2 root root 4096 6ì 22 16:20 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
root@mount-test:/work/test#
root@mount-test:/work/test# mkdir mnt
root@mount-test:/work/test#
root@mount-test:/work/test# mount -o umask=0000 /dev/sdb1 mnt
lroot@mount-test:/work/test# ls -al
Total 24
drwxr-xr-x 3 root root 4096 6ì 22 16:20 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxrwxrwx 12 root root 16384 1ì 1 1970 mnt
root@mount-test:/work/test#
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
I solved it by using the umask
option of the mount
command.
root@mount-test:/work/test# ls -al
Total 8
drwxr-xr-x 2 root root 4096 6ì 22 16:20 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
root@mount-test:/work/test#
root@mount-test:/work/test# mkdir mnt
root@mount-test:/work/test#
root@mount-test:/work/test# mount -o umask=0000 /dev/sdb1 mnt
lroot@mount-test:/work/test# ls -al
Total 24
drwxr-xr-x 3 root root 4096 6ì 22 16:20 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxrwxrwx 12 root root 16384 1ì 1 1970 mnt
root@mount-test:/work/test#
add a comment |Â
up vote
0
down vote
accepted
I solved it by using the umask
option of the mount
command.
root@mount-test:/work/test# ls -al
Total 8
drwxr-xr-x 2 root root 4096 6ì 22 16:20 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
root@mount-test:/work/test#
root@mount-test:/work/test# mkdir mnt
root@mount-test:/work/test#
root@mount-test:/work/test# mount -o umask=0000 /dev/sdb1 mnt
lroot@mount-test:/work/test# ls -al
Total 24
drwxr-xr-x 3 root root 4096 6ì 22 16:20 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxrwxrwx 12 root root 16384 1ì 1 1970 mnt
root@mount-test:/work/test#
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
I solved it by using the umask
option of the mount
command.
root@mount-test:/work/test# ls -al
Total 8
drwxr-xr-x 2 root root 4096 6ì 22 16:20 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
root@mount-test:/work/test#
root@mount-test:/work/test# mkdir mnt
root@mount-test:/work/test#
root@mount-test:/work/test# mount -o umask=0000 /dev/sdb1 mnt
lroot@mount-test:/work/test# ls -al
Total 24
drwxr-xr-x 3 root root 4096 6ì 22 16:20 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxrwxrwx 12 root root 16384 1ì 1 1970 mnt
root@mount-test:/work/test#
I solved it by using the umask
option of the mount
command.
root@mount-test:/work/test# ls -al
Total 8
drwxr-xr-x 2 root root 4096 6ì 22 16:20 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
root@mount-test:/work/test#
root@mount-test:/work/test# mkdir mnt
root@mount-test:/work/test#
root@mount-test:/work/test# mount -o umask=0000 /dev/sdb1 mnt
lroot@mount-test:/work/test# ls -al
Total 24
drwxr-xr-x 3 root root 4096 6ì 22 16:20 .
drwxr-xr-x 11 root root 4096 6ì 22 13:42 ..
drwxrwxrwx 12 root root 16384 1ì 1 1970 mnt
root@mount-test:/work/test#
answered Jun 22 at 7:23
DonBit
329214
329214
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451225%2fi-want-to-set-the-permissions-of-the-target-folder-to-777%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
777 - ? you nearly never want this :) also write your mount in fstab file, but don't forget to put some small timeout so the system don't hang when it's not mounted
â Drako
Jun 22 at 5:57
2
1. You do not need 777. 2. Change permissions AFTER mount.
â Romeo Ninov
Jun 22 at 6:02