[SOLVED] Permission for drive

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Permission for drive

Postby RoyD » Mar 11th, '12, 00:43

Hi, I am trying to setup a backup system so it backups up to another internal drive. I formatted it (ext4) and I gave it a mount point of /backup and a label of Backup. The permissions to the root directory is root, (can this be changed to user?). When I want to create a new top directory I can´t (itś grayed out). Also LuckyBackup can not create the top directory so it fails. What options do I have? or what am I doing wrong? Thanks for any help
Last edited by RoyD on Mar 13th, '12, 07:06, edited 1 time in total.
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand

Re: Permission for drive

Postby doktor5000 » Mar 11th, '12, 01:06

Please show your /etc/fstab
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Permission for drive

Postby RoyD » Mar 11th, '12, 01:38

Hi this is my etc/fstab

Code: Select all
# Entry for /dev/sda1 :
UUID=fb88ff0f-7d89-4213-b23b-1b73a06ea64d / ext4 acl,relatime 1 1
# Entry for /dev/sda1 :
LABEL=backup /backup ext4 user 1 2
# Entry for /dev/sda6 :
UUID=7e491081-eaef-4963-97c5-5c57d6a7628a /home ext4 acl,relatime 1 2
/dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
none /proc proc defaults 0 0
# Entry for /dev/sdb1 :
UUID=24e987b9-a1b1-4485-aef2-3048048ebbd8 /sdb ext4 defaults 1 2
# Entry for /dev/sdd1 :
UUID=86cebd0f-f126-4d48-9499-5afd46e01745 /vmm ext3 defaults 1 2

I decided to investigate ( that normal for me)
When I run ls -l /dev/disk/by-uuid/
I get
Code: Select all
[root@localhost ~]# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Mar 11 12:27 03d31702-f7cf-4fd5-aaca-7a5afc679f5e -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 11 12:27 24e987b9-a1b1-4485-aef2-3048048ebbd8 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Mar 11 12:27 6ec7d301-e8f1-4c6d-b41b-88f609112f6e -> ../../sdc5
lrwxrwxrwx 1 root root 10 Mar 11 12:27 7e491081-eaef-4963-97c5-5c57d6a7628a -> ../../sdc6
lrwxrwxrwx 1 root root 10 Mar 11 12:27 86cebd0f-f126-4d48-9499-5afd46e01745 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Mar 11 12:27 fb88ff0f-7d89-4213-b23b-1b73a06ea64d -> ../../sdc1

I am no genius but are the UUID all messed up between the 2?
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand

Re: Permission for drive

Postby doktor5000 » Mar 11th, '12, 15:30

RoyD wrote:
[root@localhost ~]# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Mar 11 12:27 03d31702-f7cf-4fd5-aaca-7a5afc679f5e -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 11 12:27 24e987b9-a1b1-4485-aef2-3048048ebbd8 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Mar 11 12:27 6ec7d301-e8f1-4c6d-b41b-88f609112f6e -> ../../sdc5
lrwxrwxrwx 1 root root 10 Mar 11 12:27 7e491081-eaef-4963-97c5-5c57d6a7628a -> ../../sdc6
lrwxrwxrwx 1 root root 10 Mar 11 12:27 86cebd0f-f126-4d48-9499-5afd46e01745 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Mar 11 12:27 fb88ff0f-7d89-4213-b23b-1b73a06ea64d -> ../../sdc1

I am no genius but are the UUID all messed up between the 2?

Uhmm, no, if you mean the ordering then that's the default result if you query for /dev/disk/by-uuid/
because it will be sorted by the UUIDs in ascending order, beginning with the "lowest" UUID
(just look at the first character of the UUIDs above)

For your fstab, there's no entry for /backup as you told above. Is /dev/sdb the drive you want to use
for that? It is currently mounted with the defaults, so only root can write there, this is normal behavior in that case.
Also, do you want that partition to be mounted at every boot?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Permission for drive

Postby RoyD » Mar 11th, '12, 20:41

Its funny that under MCC it shows the following under Expert Mode
Code: Select all
Mount point: /backup
Device: sda1
Volume label: backup
UUID: 03d31702-f7cf-4fd5-aaca-7a5afc679f5e
Type: Journalised FS: ext4 (0x83)
Start: sector 63
Size: 465GB (99%), 976768002 sectors
Cylinder 0 to 60800
Mounted
Partition booted by default
    (for MS-DOS boot, not for lilo)

I guess I can disconnect my drive ad run these commands to see which one it is. Yes I do want that partition to be mounted at every boot? How do I change it so its not root?
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand

Re: Permission for drive

Postby doktor5000 » Mar 11th, '12, 21:11

Well, i'm confused, something is weird here.
Your fstab shows:
# Entry for /dev/sda1 :
UUID=fb88ff0f-7d89-4213-b23b-1b73a06ea64d / ext4 acl,relatime 1 1


ls -l /dev/disk/by-uuid/ shows
lrwxrwxrwx 1 root root 10 Mar 11 12:27 03d31702-f7cf-4fd5-aaca-7a5afc679f5e -> ../../sda1


MCC shows:

Mount point: /backup
Device: sda1
Volume label: backup
UUID: 03d31702-f7cf-4fd5-aaca-7a5afc679f5e


The problem is that sda1 is your root partition according to your fstab, but ls -l /dev/disk/by-uuid/ and MCC
show something different. Could you please show the output as root of blkid and mount?

Relating to changing the user or making it writeable for your user, there are many ways to do this.
You could allow your user to mount this, so you could mount it manually and it would belong to the user
who mounted it, or you could automatically mount it and specify a user who should be the owner of all
files, or you could make it writeable to everybody.
But first we need to clear up the confusion about your partitions.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Permission for drive

Postby Ken-Bergen » Mar 11th, '12, 22:43

doktor5000 wrote:Well, i'm confused, something is weird here.
It's not weird and not unexpected behaviour when adding a hard drive.
When a drive is added the device nodes can change depending on which ports are used.
Mounting by UUID was introduced to overcome the problem of changing device nodes which it did here.
I find it strange that an internal drive would be mounted by LABEL rather than UUID but that shouldn't be a problem.
The problem as far as I can see is one of permissions on /backup and I think
Code: Select all
chmod 666 /backup
in a terminal as root should fix the problem.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Permission for drive

Postby RoyD » Mar 12th, '12, 05:12

Here we go
Code: Select all
[root@localhost ~]# blkid
/dev/sda1: UUID="03d31702-f7cf-4fd5-aaca-7a5afc679f5e" TYPE="ext4" LABEL="backup"
/dev/sdc1: UUID="fb88ff0f-7d89-4213-b23b-1b73a06ea64d" TYPE="ext4"
/dev/sdc5: UUID="6ec7d301-e8f1-4c6d-b41b-88f609112f6e" TYPE="swap"
/dev/sdc6: UUID="7e491081-eaef-4963-97c5-5c57d6a7628a" TYPE="ext4"
/dev/sdb1: UUID="24e987b9-a1b1-4485-aef2-3048048ebbd8" TYPE="ext4"
/dev/sdd1: LABEL="Virtual Machines" UUID="86cebd0f-f126-4d48-9499-5afd46e01745" TYPE="ext3"


Code: Select all
[root@localhost ~]# mount
/dev/sdc1 on / type ext4 (rw,relatime,acl,commit=0)
none on /proc type proc (rw)
/dev/sda1 on /backup type ext4 (rw,noexec,nosuid,nodev,commit=0)
/dev/sdc6 on /home type ext4 (rw,relatime,acl,commit=0)
/dev/sdb1 on /sdb type ext4 (rw,commit=0)
/dev/sdd1 on /vmm type ext3 (rw,commit=0)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
gvfs-fuse-daemon on /home/roy/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=roy)
[root@localhost ~]#
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand

Re: Permission for drive

Postby RoyD » Mar 12th, '12, 05:19

chmod 666 /backup in root did not fix the permission problem meaning a users can not create a directory. root can.
Last edited by RoyD on Mar 12th, '12, 05:31, edited 1 time in total.
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand

Re: Permission for drive

Postby RoyD » Mar 12th, '12, 05:26

I guess in the end I would like to automatically mount it and make it writeable to everybody.
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand

Re: Permission for drive

Postby Ken-Bergen » Mar 12th, '12, 06:20

RoyD wrote:chmod 666 /backup in root did not fix the permission problem meaning a users can not create a directory. root can.
From the mount output it seems I was wrong and the LABEL entry in /etc/fstab is the problem.
Perhaps the doktor has a better idea but this is what I'd do.
Edit /etc/fstab, comment out the LABEL line and add a UUID line like this.
Code: Select all
# Entry for /dev/sda1 :
# LABEL=backup /backup ext4 user 1 2
UUID=03d31702-f7cf-4fd5-aaca-7a5afc679f5e  /backup ext4 acl,relatime 1 2
Then as root
Code: Select all
mount -a
Of course /backup would need to be unmounted first for the mount -a to work or you could simply reboot.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Permission for drive

Postby RoyD » Mar 12th, '12, 07:00

hi Ken

I did all the changers but to no success. I tried but the permission problem is still a problem. Every time I tried to create a new folder I get ¨Access denied to backup/test2¨
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand

Re: Permission for drive

Postby Ken-Bergen » Mar 12th, '12, 07:37

RoyD wrote:hi Ken

I did all the changers but to no success. I tried but the permission problem is still a problem. Every time I tried to create a new folder I get ¨Access denied to backup/test2¨
I just tested and 666 doesn't allow me to create folders but 777 does. :oops:
So
Code: Select all
chmod 777 /backup
may work for you.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: (Solved) Permission for drive

Postby RoyD » Mar 13th, '12, 07:09

Thanks both, the 777 worked, some other issues have started but I am moving forward but that is another posting. ta Roy
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron