LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Permissions Changed When I Copied Files (https://www.linuxquestions.org/questions/linux-desktop-74/permissions-changed-when-i-copied-files-498911/)

Cara25 11-05-2006 03:50 PM

Permissions Changed When I Copied Files
 
This is not a "show stopper" but I would like to know how to keep it from happening again.
During a new install of Mandriva 2007, I copied and burned all my /home/scott/*.* files to a CD including my existing bookmarks from Firefox. I reinstalled all the old files and bookmarks by "cut & paste" to the new, 2007 directory and imported the old bookmarks to the new Firefox. Now all the files and bookmarks have the permissions set to read only, why is this and how can I prevent it from happening in the future ?
Thanks,
Scott Nash

macemoneta 11-05-2006 04:06 PM

The files on CD are read-only media, so copying them with the '-a' parameter copies the read-only flag.

The proper way to do this is to use a utility like tar to backup the files. When you extract them to their original location, they will retain their permissions.

OldAl 11-05-2006 04:28 PM

Quote:

Originally Posted by macemoneta
The files on CD are read-only media, so copying them with the '-a' parameter copies the read-only flag.

The proper way to do this is to use a utility like tar to backup the files. When you extract them to their original location, they will retain their permissions.

Would this work also with other distros, viz suse?

OldAl.

macemoneta 11-05-2006 04:56 PM

The tar command will work with all Linux distributions.

Cara25 11-06-2006 07:26 PM

macemoneta, thanks ! I didn't know or think about using tar in a situation like this, I'll do it from now on. I learn something new every day.

OldAl 11-07-2006 01:55 AM

Consider using the compression option when creating the tar ball (-z switch).

OldAl


All times are GMT -5. The time now is 03:52 AM.