Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I have mounted an external hard disk onto my Ubuntu 9.10 system. the hard disk has three partitions; an ntfs, fat32, and a HFS+ Mac OS X (0xaf). I ...
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    2

    Read-only permission on a zip file

    Hi,

    I have mounted an external hard disk onto my Ubuntu 9.10 system. the hard disk has three partitions; an ntfs, fat32, and a HFS+ Mac OS X (0xaf).

    I have a folder on the HFS partition called 'folder1' and want to copy it and all its contents over to the ntfs partition.

    The problem I have is that foler1 contains a zip file called 'file.zip' . This file has read-only permissions for some reason. As a result when I run cp -r folder1 /media/ntfs/ it copies all the files in folder1 except for file.zip. the ls -al for file.zip is -rwx------ file.zip . I have tried sudo chmod go+r and it doesn't work.

    Does anyone know how I can change the permissions on file.zip so that I can copy it over?

    Thanks

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,935
    This file has read-only permissions for some reason
    the ls -al for file.zip is -rwx------ file.zip
    The second line above shows root (or whoever the owner is) has read, write, execute so log in as root and do it.

    I have tried sudo chmod go+r and it doesn't work.
    The chmod command above would add read permission to group and others so that won't help!

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,961
    You might need to actually be logged in as root to copy this file. The permissions are such that only the owner and root can read the file, which you need to be able to do in order to copy it. Also, sudo sometimes doesn't provide sufficient privileges, especially when accessing a "foreign" file system like this, hence the need to be logged, or su - to root in order to access it.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined!
    Join Date
    Jul 2005
    Posts
    30

    Can't copy zip file

    To copy when the system does not allow you to do so, open a terminal and enter the following command

    sudo su

    in the terminal . You are now root, and you can do a cd to /media and from there, find your file and copy the read protected file to /tmp

    switching to /tmp for your file, do a chown yourlogon:yourlogon filename.zip where filename.zip is the one you copied.

    You could also do a chmod 777 filename.zip and exit.

  5. #5
    Just Joined!
    Join Date
    Feb 2007
    Posts
    2
    Thank you all for your helpful input.

    lsatenstein solved my problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...