You are not logged in.

#1 2010-07-05 19:55:19

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

[SOLVED] Mounting and Partition Permissions

Hello, I've recently created a partition sda9, and in /media/Backup as I have it the label Backup. So far I have managed to use rsync to copy /etc /var and /home to it with success:

alias backetc='sudo rsync -a --delete /etc /media/Backup'

alias backhome='sudo rsync -a --delete /home /media/Backup'

alias backvar='sudo rsync -a --delete /var /media/Backup'

But now I want to create a pkg.list on that partition as well:

pacman -Qqe | grep -vx "$(pacman -Qqm)" > /media/Backup/pkg.list

but when I do it tells me permission is denied, because the creator of the partition and the owner is root as Gparted starts as root with me. I tried remounting it as read write as I read elsewhere:

sudo mount -o remount,rw /dev/sda9

but thaat didn't work, permissions and stuff like this is another thing Ubuntu has sheltered me from I guess with it's nice graphical administration section and tools. I had a go at creating the pkg.list on my desktop and copying and pasteing it over and it still didn't work. I've had the idea of putting this partition in fstab to have it mount when I boot as I'm aware there are options like users and such, but I haven't done that yet as I figured a backup partiton does not want to be mounted all the time, it wants to be left alone as much as possible (this is a logical parition in the extended partition). How can I get around this permission barrier?

Cheers.

Last edited by Ben9250 (2010-07-05 21:36:57)


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

#2 2010-07-05 19:58:01

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] Mounting and Partition Permissions

What filesystem are you using for sda9? Have you looked at man chmod and man chown?


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2010-07-05 20:03:09

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

Re: [SOLVED] Mounting and Partition Permissions

I'm using ext4 filesystem, chmod is a recent new mystery to me, the only time I've encountered it is with bash scripts in the context of cron. My current understanding is that you chance file permissions in it with such as rwx and each means read, write and execute.

Last edited by Ben9250 (2010-07-05 20:07:00)


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

#4 2010-07-05 20:05:59

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] Mounting and Partition Permissions

Make yourself familiar with chmod and chown. They will be on the test.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#5 2010-07-05 20:11:45

TheCox
Member
From: Orlando, FL
Registered: 2010-02-23
Posts: 34

Re: [SOLVED] Mounting and Partition Permissions

There aren't permissions associated with partitions. They are associated with files and directories. Your /media/Backup directory is probably owned by root, which is why you can't write to it unless you are the root user or you use sudo.

Offline

#6 2010-07-05 20:18:54

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

Re: [SOLVED] Mounting and Partition Permissions

I've just found a good tutorial of Chmod and I understand how to edit permissions for groups, user who owns the file etc with r,w and x. But the directory is listed thus : drwxr-xr-x 6 root root 4096 Jul  5 20:19 Backup. Which is not dealt with in my tutorial - it seems its owned by root and belongs to the root group too, and that root has all the permissions. I tried sudo in front of pacman -Qqe | grep -vx "$(pacman -Qqm)" > /media/Backup/pkg.list but it didn't work. I suppose one possiblity is to create the pkg.list on the desktop or home and then a seperate sudo or su cp command to put it on the Backup partition?
[EDIT] I've just learned chown too and have changed the owner to ben to see if it works, I've left group as root as I don't know what else I could change it to.

[EDIT2] SOLVED! using chown to change the owner to myself solved the issue - thank you very much for your help, I've learned two new thing which a week ago scared the crap outta me =]

Last edited by Ben9250 (2010-07-05 20:23:12)


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

#7 2010-07-05 20:40:01

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: [SOLVED] Mounting and Partition Permissions

Mark this solved and share the tutorial perhaps for future searchers of the forum?

Offline

#8 2010-07-05 21:00:41

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

Re: [SOLVED] Mounting and Partition Permissions

MoonSwan wrote:

Mark this solved and share the tutorial perhaps for future searchers of the forum?

Ah.. now this is a silly question but one I never solved, how do we mark things as solved on this forum? I don't see any thread-tools in any threads I've posted/made.


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

Board footer

Powered by FluxBB