LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Trying to change file permissions (https://www.linuxquestions.org/questions/linux-software-2/trying-to-change-file-permissions-485982/)

Rollotamasi 09-22-2006 10:13 AM

Trying to change file permissions
 
First, I appoligize if this is the incorrect forum for this question. It seemed like the closest one to my problem. Now onto the problem.

One of my customers recently broght me a external drive (He was using on a mac) that his mac would no longer mount the drive. He is a graphic designer and has ALOT of data on the drive that would be devestating for him to loose. We tried to mount the drive on a few differnt macs and PC's (running XP) and nothing would see it. Linux to the resuce! I boot to my SUSE 10.1 partition and it mounted to problem. I was very happy until I tried to copy the data. I get a file permision error. After looking at the permisions basicly the only person that has access to do anything other then open the files is the owner, who of couse isnt present on my linux partition.

So my question is this. Is there a way that I can change the file permissions that will allow me to copy the data to another drive? Unfortuanetly I am not terribly fluent in linux. I put it on my laptop so I could begin learning it but havent gotten very far. Any help would be greatly appericated.

Thanks all.

rizhun 09-22-2006 10:16 AM

I'm going to have to ask the obvious as you didn't specify... but did you try and copy the files as root? is the HD mounted r/w?

If not, you want to switch to root, and chmod 777 the files you want to copy.. then copy them.
(see 'man chmod').

stress_junkie 09-22-2006 11:01 AM

I hate to disagree. I really really do. Really. But this is what I would do.

If the Mac is running the new Mac OS X, the one based on BSD Unix, I would do this.

1) Log on as root.
2) Create a mount point. (/problem)
3) Mount the disk read only and with GID=100. This will mount the disk partition as being owned by the users group. Then you can use a normal user account to access the files.
4) Log on as a normal user and try to copy the files to another disk.
If the Mac disk is mapped to /dev/sda1 then I would do this.
Code:

root> mkdir /problem
root> mount -o ro,gid=100 /dev/sda1 /problem
root> su - normaluser
$ ls /problem
$ cp -R /problem <somewhere-else>



All times are GMT -5. The time now is 10:14 PM.