You are not logged in.

#1 2011-05-21 10:54:57

feonx
Member
Registered: 2011-05-21
Posts: 3

[Solved] File system permissions

Hi,

First of all, thanks for reading.

This is the way my hard disk is partitioned:
sda1 /boot ext2
sda2 swap swap
sda3 /root ext4
sda4 /home ext4

Yesterday I noticed that my "root" only had 7,6 GB of space. I didn't really thought of creating a bigger partition when installing Arch.  The "root" had only 30 MB of space left, so I couldn't install anything any more.

I decided to change the partition size. I've back upped the entire hard disk on a eSATA drive and I booted from the "gparted live CD".  The steps I did:
1. Delete sda3
2. Resize sda4
3. Created sda3 from unallocated space
4. Copied all the files from the backup back to sda3 and sda4
5. Changed the correct UUID in the /etc/fstab
6. Changed the correct UUID in the /boot/grub/menu.lst

After booting I couldn't login to my user account. It gave me a "bin/bash: Permission Denied" error. So I decided to boot from a ubuntu live cd and changed some folders so the users group has permission to access.

But now when I boot Arch I can login at my account, but it has all kinds of permission errors. The command line looks like this:

bin/bash: Permission Denied on /etc/profiles
[I have no name]@feonx-laptop $ 

Can someone tell me how I can fix all the permissions as the should be? I've been trying and searching everything.

Kind regards,

Mike

Last edited by feonx (2011-05-23 10:36:03)

Offline

#2 2011-05-21 11:18:49

mangust
Member
From: nomad
Registered: 2010-09-18
Posts: 31

Re: [Solved] File system permissions

Hi!

Your problem might be solved by repartitioning and reinstalling (yes, I know a bit extreme solution, and from my point of view), but this way you won't spend a lot of time fixing the permissions. Tip: to be more flexible in partitions size consider using LVM (more here).


"I hate computers, why didn't I become a street musician?" - phrakture

Offline

#3 2011-05-21 11:23:04

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: [Solved] File system permissions

Did you preserve the permissions when you copied? If not, you'll either have to spend a long time changing the permissions of pretty much every single file, or just reinstall.

Offline

#4 2011-05-21 11:29:14

broken pipe
Member
Registered: 2010-12-10
Posts: 238

Re: [Solved] File system permissions

reinstalling is imo the best and cleanest way altough it's a bit time consuming

you could also try reinstalling all packages: https://wiki.archlinux.org/index.php/Pa … nus_AUR.29

and chown your user's home: chown -R user /home/user

but i don't know if it works sad ... good luck!

Offline

#5 2011-05-21 14:17:16

lukaszan
Member
Registered: 2011-05-05
Posts: 117

Re: [Solved] File system permissions

Looks like you messed up your permissions big time.

New to Arch myself, but I'd try and refresh all packages on your mounted root from a live CD:

1. boot from live Arch
2. mount your root (assume /mnt/sda3)
3. refresh package list for live Arch

pacman -Syy

4. run this script to refresh all packages on mounted root

for pkg in $(pacman -Q -b /mnt/sda3/var/lib/pacman | cut -d ' ' -f1); do
pacman -S -r /mnt/sda3 $pkg 
done

Now this is untested, but worth giving a go.


And for future, the SAFEST way to backup your root is to boot from live CD and do:

tar cvpfJ path-to-archived-root.txz /mnt/your-mounted-root-partition

This will create an archive with all the files and directories with preserved onwership and permissions (you can do it from a running box as well, but it's a little bit more complicated).

Last edited by lukaszan (2011-05-21 14:28:41)

Offline

#6 2011-05-23 10:34:04

feonx
Member
Registered: 2011-05-21
Posts: 3

Re: [Solved] File system permissions

Thanks all for the quick responses.

@lukaszan: I tried to use you're script but it didn't work, I got allot of messages like, "no such file or directory".
Thanks for the better back-up solution, I will try use it next time.

@everyone: I reinstalled my Arch Linux and it's working fine again.

Thanks for the support!

Gr. Mike

Last edited by feonx (2011-05-23 10:35:17)

Offline

Board footer

Powered by FluxBB