Change all permissions

14 respostas [Última entrada]
ssdclickofdeath
Desconectado
Joined: 05/18/2013

I just installed Trisquel, migrating from Mac OS X. I made a backup of my home directory in OS X onto an external hard drive, but the permissions were set for my old user in OS X, so I can't read the files in Trisquel. How would I change the permissions in the whole directory tree?

lembas
Desconectado
Joined: 05/13/2010

sudo chown -R `whoami`:`whoami` /path/to/home/folder

Dave_Hunt

I am a member!

Desconectado
Joined: 09/19/2011

Assuming the username gameboy, and the directory called
files-from-osx,do this in a terminal:

sudo -i
enter your password
chown --recursive gameboy /home/gameboy/files-from-osx/
exit
chmod --recursive 755 /home/gameboy/files-from-osx/

HTH,

Dave

ssdclickofdeath
Desconectado
Joined: 05/18/2013

I'm not sure if it worked, because this is a sample of much of the output:

"chown: changing ownership of `/media/320 Gigabyte/Mac Mini Home Folder Backup/': Read-only file system"

The files are on an external hard drive, connected by USB.
I also noticed that there is no option to delete files on that drive, the 'Move to Trash' option on the right-click menu is grayed out.

Dave_Hunt

I am a member!

Desconectado
Joined: 09/19/2011

If your name shows up in the output of

ls -la /media/320\ Gigabyte/Mac\ Mini\ Home\ Folder\ Backup/'

you own the files. I think the owner's and group's names are in the 4th
and 5th columns of the listing.

What is the output of

chmod --recursive 755 /media/320\ Gigabyte/Mac\ Mini\ Home\ Folder\
Backup/'

This 'chmod' command sets permissions such that you can do everything to
the files, but your group and all other users can only read and execute.

ssdclickofdeath
Desconectado
Joined: 05/18/2013

It doesn't actually say my name, but here is the output.

terminal.png
teodorescup

I am a member!

Desconectado
Joined: 01/04/2011

Who owns "320 Gigabyte" ?

ll "/media/320 Gigabyte"
ssdclickofdeath
Desconectado
Joined: 05/18/2013

I'm not sure, it was formatted as HFS+ with Mac OS X 10.6.8, and I don't know how to read permissions yet.

Terminal2.png
Dave_Hunt

I am a member!

Desconectado
Joined: 09/19/2011

Oh, I'm not sure how to work with those formats in Trisquel. Whenever I
want to exchange files, using a USB drive, I format the file system as
FAT on the USB. When sneaker-netting files from one machine running
GNU/Linux to another, I suppose you can format the USB as ext3, ext4, or
xfs?

lembas
Desconectado
Joined: 05/13/2010

Looks like this is a fairly common issue. If my web search-fu is strong, this happens because of a problem with the file system.

The best solution would be to copy all you wish to save off the disk and then reformat it. Or if you're a gambler, you could fsck [1] it. :)

[1] https://en.wikipedia.org/wiki/Fsck

ssdclickofdeath
Desconectado
Joined: 05/18/2013

If I try to copy it, it says "Permission Denied", or something like that.

Dave_Hunt

I am a member!

Desconectado
Joined: 09/19/2011

I ended up copying and reformatting one of these after returning home to
Trisquel from another distro that messed things up. Long story. LOL.
Also, if you haven't broken down the Mac Mini, you can start it, connect
it to your network, find it on your Trisquel box (open the desktop
folder called "network servers"), and log into your Mini from there.
Once connected, working with the remote folder is just like working with
any folder already on the Trisquel side.

ssdclickofdeath
Desconectado
Joined: 05/18/2013

I'm running Trisquel on my Mac Mini as my primary machine. I have a Time Machine backup, too, (uses version control) but I just copied my OS X home folder to an external drive, then installed Trisquel.

icarolongo
Desconectado
Joined: 03/26/2011

Try Nautilus (File Manager) as root.

Alt+F2 > gksu nautilus > type your password.

Or in Terminal:
sudo nautilus
your password

And change the permissions with right click in the folder > properties.

icarolongo
Desconectado
Joined: 03/26/2011