I want to set the permissions of the target folder to 777

The name of the pictureThe name of the pictureThe name of the pictureClash 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#






share|improve this question















  • 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














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#






share|improve this question















  • 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












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#






share|improve this question











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#








share|improve this question










share|improve this question




share|improve this question









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












  • 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










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#





share|improve this answer





















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    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






























    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#





    share|improve this answer

























      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#





      share|improve this answer























        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#





        share|improve this answer













        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#






        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jun 22 at 7:23









        DonBit

        329214




        329214






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            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













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay