untar error - Cannot change mode to rwxr-sr-x [on hold]











up vote
1
down vote

favorite
1












I am trying to untar a .gz file , which is stored in the /root folder onto a directory in /mnt/flash2/example



I use the following command:



tar xzf filename.gz --no-same-owner -C /mnt/flash2/example


I get the following error:



tar: filename: Cannot change mode to rwxr-sr-x: Operation not permitted









share|improve this question















put on hold as off-topic by Jeff Schaller, RalfFriedl, Christopher, Rui F Ribeiro, Fabby yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, RalfFriedl, Christopher, Rui F Ribeiro, Fabby

If this question can be reworded to fit the rules in the help center, please edit the question.













  • What's the filesystem? FAT/vFAT/NTFS on a flash drive?
    – Christopher
    Jun 17 '15 at 19:38










  • @Christopher i used the blkid and df commands. It is a vfat filesystem
    – shivram
    Jun 17 '15 at 19:42








  • 1




    Right - no sticky, setgid, or setuid bits are supported on vfat.
    – Christopher
    Jun 17 '15 at 19:55












  • well the problem is I cannot store the untared files to the /root directory (lack of space) , So i am putting it onto the other directory which is of vfat. Now is there a way to go around this? @Christopher
    – shivram
    Jun 17 '15 at 21:26












  • You might find gunzip more appropriate for gz file. For example: gunzip -c filename.gz >/mnt/flash2/example
    – Bridgey
    Jun 17 '15 at 22:27















up vote
1
down vote

favorite
1












I am trying to untar a .gz file , which is stored in the /root folder onto a directory in /mnt/flash2/example



I use the following command:



tar xzf filename.gz --no-same-owner -C /mnt/flash2/example


I get the following error:



tar: filename: Cannot change mode to rwxr-sr-x: Operation not permitted









share|improve this question















put on hold as off-topic by Jeff Schaller, RalfFriedl, Christopher, Rui F Ribeiro, Fabby yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, RalfFriedl, Christopher, Rui F Ribeiro, Fabby

If this question can be reworded to fit the rules in the help center, please edit the question.













  • What's the filesystem? FAT/vFAT/NTFS on a flash drive?
    – Christopher
    Jun 17 '15 at 19:38










  • @Christopher i used the blkid and df commands. It is a vfat filesystem
    – shivram
    Jun 17 '15 at 19:42








  • 1




    Right - no sticky, setgid, or setuid bits are supported on vfat.
    – Christopher
    Jun 17 '15 at 19:55












  • well the problem is I cannot store the untared files to the /root directory (lack of space) , So i am putting it onto the other directory which is of vfat. Now is there a way to go around this? @Christopher
    – shivram
    Jun 17 '15 at 21:26












  • You might find gunzip more appropriate for gz file. For example: gunzip -c filename.gz >/mnt/flash2/example
    – Bridgey
    Jun 17 '15 at 22:27













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I am trying to untar a .gz file , which is stored in the /root folder onto a directory in /mnt/flash2/example



I use the following command:



tar xzf filename.gz --no-same-owner -C /mnt/flash2/example


I get the following error:



tar: filename: Cannot change mode to rwxr-sr-x: Operation not permitted









share|improve this question















I am trying to untar a .gz file , which is stored in the /root folder onto a directory in /mnt/flash2/example



I use the following command:



tar xzf filename.gz --no-same-owner -C /mnt/flash2/example


I get the following error:



tar: filename: Cannot change mode to rwxr-sr-x: Operation not permitted






permissions tar






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 9 at 5:38









Kevin Lemaire

1,125523




1,125523










asked Jun 17 '15 at 19:33









shivram

914




914




put on hold as off-topic by Jeff Schaller, RalfFriedl, Christopher, Rui F Ribeiro, Fabby yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, RalfFriedl, Christopher, Rui F Ribeiro, Fabby

If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by Jeff Schaller, RalfFriedl, Christopher, Rui F Ribeiro, Fabby yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, RalfFriedl, Christopher, Rui F Ribeiro, Fabby

If this question can be reworded to fit the rules in the help center, please edit the question.












  • What's the filesystem? FAT/vFAT/NTFS on a flash drive?
    – Christopher
    Jun 17 '15 at 19:38










  • @Christopher i used the blkid and df commands. It is a vfat filesystem
    – shivram
    Jun 17 '15 at 19:42








  • 1




    Right - no sticky, setgid, or setuid bits are supported on vfat.
    – Christopher
    Jun 17 '15 at 19:55












  • well the problem is I cannot store the untared files to the /root directory (lack of space) , So i am putting it onto the other directory which is of vfat. Now is there a way to go around this? @Christopher
    – shivram
    Jun 17 '15 at 21:26












  • You might find gunzip more appropriate for gz file. For example: gunzip -c filename.gz >/mnt/flash2/example
    – Bridgey
    Jun 17 '15 at 22:27


















  • What's the filesystem? FAT/vFAT/NTFS on a flash drive?
    – Christopher
    Jun 17 '15 at 19:38










  • @Christopher i used the blkid and df commands. It is a vfat filesystem
    – shivram
    Jun 17 '15 at 19:42








  • 1




    Right - no sticky, setgid, or setuid bits are supported on vfat.
    – Christopher
    Jun 17 '15 at 19:55












  • well the problem is I cannot store the untared files to the /root directory (lack of space) , So i am putting it onto the other directory which is of vfat. Now is there a way to go around this? @Christopher
    – shivram
    Jun 17 '15 at 21:26












  • You might find gunzip more appropriate for gz file. For example: gunzip -c filename.gz >/mnt/flash2/example
    – Bridgey
    Jun 17 '15 at 22:27
















What's the filesystem? FAT/vFAT/NTFS on a flash drive?
– Christopher
Jun 17 '15 at 19:38




What's the filesystem? FAT/vFAT/NTFS on a flash drive?
– Christopher
Jun 17 '15 at 19:38












@Christopher i used the blkid and df commands. It is a vfat filesystem
– shivram
Jun 17 '15 at 19:42






@Christopher i used the blkid and df commands. It is a vfat filesystem
– shivram
Jun 17 '15 at 19:42






1




1




Right - no sticky, setgid, or setuid bits are supported on vfat.
– Christopher
Jun 17 '15 at 19:55






Right - no sticky, setgid, or setuid bits are supported on vfat.
– Christopher
Jun 17 '15 at 19:55














well the problem is I cannot store the untared files to the /root directory (lack of space) , So i am putting it onto the other directory which is of vfat. Now is there a way to go around this? @Christopher
– shivram
Jun 17 '15 at 21:26






well the problem is I cannot store the untared files to the /root directory (lack of space) , So i am putting it onto the other directory which is of vfat. Now is there a way to go around this? @Christopher
– shivram
Jun 17 '15 at 21:26














You might find gunzip more appropriate for gz file. For example: gunzip -c filename.gz >/mnt/flash2/example
– Bridgey
Jun 17 '15 at 22:27




You might find gunzip more appropriate for gz file. For example: gunzip -c filename.gz >/mnt/flash2/example
– Bridgey
Jun 17 '15 at 22:27










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I found an answer that helped me here:
https://superuser.com/questions/699225/avoid-errors-from-tar-failing-to-restore-directory-permissions



The error basically occurred because the tarball had two folders (with no files) that did not exist on the destination server.
Evidentally the flag --no-overwrite-dir might do the trick.
(See above link)



In my case, I instead manually created those two directories and set the permissions to 755.

When I re-ran the extraction, everything worked perfect!



To recap

Problem:

I was extracting a tar file which had empty WordPress uploads folders 2017 and 2017/01 which were not on the destination server.
tar -zxvf created those two folders on the destination server with folder permissions to 775,

and could not change them to 775..



As per the above link, i believe this may happen only if the tarball has empty directories that are not part of an existing tree that you are replacing.



Solution:

-- try the --no-overwrite-dir flag

-- manually create and set permissions on the missing (empty?) folders






share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I found an answer that helped me here:
    https://superuser.com/questions/699225/avoid-errors-from-tar-failing-to-restore-directory-permissions



    The error basically occurred because the tarball had two folders (with no files) that did not exist on the destination server.
    Evidentally the flag --no-overwrite-dir might do the trick.
    (See above link)



    In my case, I instead manually created those two directories and set the permissions to 755.

    When I re-ran the extraction, everything worked perfect!



    To recap

    Problem:

    I was extracting a tar file which had empty WordPress uploads folders 2017 and 2017/01 which were not on the destination server.
    tar -zxvf created those two folders on the destination server with folder permissions to 775,

    and could not change them to 775..



    As per the above link, i believe this may happen only if the tarball has empty directories that are not part of an existing tree that you are replacing.



    Solution:

    -- try the --no-overwrite-dir flag

    -- manually create and set permissions on the missing (empty?) folders






    share|improve this answer



























      up vote
      0
      down vote













      I found an answer that helped me here:
      https://superuser.com/questions/699225/avoid-errors-from-tar-failing-to-restore-directory-permissions



      The error basically occurred because the tarball had two folders (with no files) that did not exist on the destination server.
      Evidentally the flag --no-overwrite-dir might do the trick.
      (See above link)



      In my case, I instead manually created those two directories and set the permissions to 755.

      When I re-ran the extraction, everything worked perfect!



      To recap

      Problem:

      I was extracting a tar file which had empty WordPress uploads folders 2017 and 2017/01 which were not on the destination server.
      tar -zxvf created those two folders on the destination server with folder permissions to 775,

      and could not change them to 775..



      As per the above link, i believe this may happen only if the tarball has empty directories that are not part of an existing tree that you are replacing.



      Solution:

      -- try the --no-overwrite-dir flag

      -- manually create and set permissions on the missing (empty?) folders






      share|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        I found an answer that helped me here:
        https://superuser.com/questions/699225/avoid-errors-from-tar-failing-to-restore-directory-permissions



        The error basically occurred because the tarball had two folders (with no files) that did not exist on the destination server.
        Evidentally the flag --no-overwrite-dir might do the trick.
        (See above link)



        In my case, I instead manually created those two directories and set the permissions to 755.

        When I re-ran the extraction, everything worked perfect!



        To recap

        Problem:

        I was extracting a tar file which had empty WordPress uploads folders 2017 and 2017/01 which were not on the destination server.
        tar -zxvf created those two folders on the destination server with folder permissions to 775,

        and could not change them to 775..



        As per the above link, i believe this may happen only if the tarball has empty directories that are not part of an existing tree that you are replacing.



        Solution:

        -- try the --no-overwrite-dir flag

        -- manually create and set permissions on the missing (empty?) folders






        share|improve this answer














        I found an answer that helped me here:
        https://superuser.com/questions/699225/avoid-errors-from-tar-failing-to-restore-directory-permissions



        The error basically occurred because the tarball had two folders (with no files) that did not exist on the destination server.
        Evidentally the flag --no-overwrite-dir might do the trick.
        (See above link)



        In my case, I instead manually created those two directories and set the permissions to 755.

        When I re-ran the extraction, everything worked perfect!



        To recap

        Problem:

        I was extracting a tar file which had empty WordPress uploads folders 2017 and 2017/01 which were not on the destination server.
        tar -zxvf created those two folders on the destination server with folder permissions to 775,

        and could not change them to 775..



        As per the above link, i believe this may happen only if the tarball has empty directories that are not part of an existing tree that you are replacing.



        Solution:

        -- try the --no-overwrite-dir flag

        -- manually create and set permissions on the missing (empty?) folders







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 20 '17 at 10:18









        Community

        1




        1










        answered Jan 5 '17 at 21:04









        SherylHohman

        1316




        1316















            Popular posts from this blog

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt