You are not logged in.
I have added a harddisk to my desktop system, but I am not allowed to write to it as user.
Here is the output of 'id' and 'groups' from userarea and root, respectively:
$ id
uid=1000(myself) gid=1000(myself) groups=1000(myself),6(disk),7(lp),10(wheel),21(locate),81(dbus),82(hal),91(video),92(audio),93(optic al),94(floppy),95(storage),98(power),100(users),102(policykit)
# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),19(log)
$ groups
disk lp wheel locate dbus hal video audio optical floppy storage power users policykit myself
# groups
root bin daemon sys adm disk wheel log
All my disks have
User: root
Group: disk
I had thought that as long as the user (myself) belonged to the group 'disk', I, as user, would have full/all permissions. And I do, for the disk which was present during my Arch installation, but not for the newer disk. I have the newer disk commented out in 'fstab', but that shouldn't make a difference? Otherwise all settings look, to me, to be the same for all disks.
What am I missing?
Last edited by whaler (2009-12-28 20:41:33)
Offline
You will need to change ownership of the mount to your user.
Have a peek at "man chown"
For example -
chown whaler /u
Change the owner of /u to "whaler".
chown whaler:staff /u
Likewise, but also change its group to "staff".
chown -hR whaler /u
Change the owner of /u and subfiles to "whaler".
Don't break the silence unless you can improve upon it.
Offline
post the output of
cat /etc/fstab
ls -l /media
assuming you are mounting your newer hard drive partitions under /media.
Offline
$ cat /etc/fstab
#
# /etc/fstab: static file system information
#
#
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs defaults 0 0
#/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
#/dev/fd0 /media/fl auto user,noauto 0 0
UUID=6d68c260-964b-49de-96c2-49c76e2e7a72 /boot ext3 defaults 0 1
UUID=3d7539c8-9430-4b41-b496-4c0e9810a8d0 / reiserfs defaults 0 1
UUID=1567da21-a0a3-4c85-b8d7-5e4cbf01ee5e /home jfs defaults 0 1
$ ls -l /media
totalt 8
drwxr-xr-x 2 root root 48 2009-11-01 04:53 cd
drwxr-xr-x 14 myself myself 4096 2009-12-25 20:16 Data
drwxr-xr-x 2 root root 48 2009-11-01 04:53 dvd
drwxr-xr-x 2 root root 48 2009-11-01 04:53 fl
drwxr-xr-x 7 root root 48 2009-10-04 01:31 Super_B
---
The newer disk is an unpartitioned 1.5 TB SATA, formatted JFS. I can mount and read the files on it with e.g. Dolphin, but I have no write permission as user. Mounting it as root from the command line I have full access/all permissions. I am using JFS on my /home and /Data IDE/ATA partitions and an unformatted external USB disk of 1.0 TB without problems.
The only differences I can think of with the newer disk is the size and the Serial ATA implementation... And, yes, I am mounting drives not in fstab under /media.
Last edited by whaler (2009-12-27 13:10:25)
Offline
You will need to change ownership of the mount to your user.
Have a peek at "man chown"
For example - (...)
Yes, thank you, but I want to know why I must treat the newer SATA drive differently from my other drives.
Edit:
Hmmm... I notice now that my 'Data' partition has the user 'myself' as owner... But I never had to do anything to specify that when I created that partition during installation...? And I didn't need to for my external disk either, later on. Perhaps I should just do as you advise
But why?
Last edited by whaler (2009-12-27 13:16:06)
Offline
I've never been able to 'take to' policykit just for the sheer 'pleasure' of having automount. The same goes for the different file-managers, I turn off automounting just as soon as I can.
That, obviously, leaves _me_ in charge of whenever/whereever things get mounted.
So - if I had been in your position, I would have done:
#chown root:root /where/to/mount/disk; chmod a+rwx /where/to/mount/disk
As this is just another disk - and not likely to be removed - I most certainly would include it in /etc/fstab.
As I said - these are _my_ preferences, but if you do a li'l search in this forum, you will see that automounting seem to be the grief of a rarther large proportion of posts ...
Offline
I've never been able to 'take to' policykit just for the sheer 'pleasure' of having automount. The same goes for the different file-managers, I turn off automounting just as soon as I can.
That, obviously, leaves _me_ in charge of whenever/whereever things get mounted.
So - if I had been in your position, I would have done:
#chown root:root /where/to/mount/disk; chmod a+rwx /where/to/mount/disk
As this is just another disk - and not likely to be removed - I most certainly would include it in /etc/fstab.As I said - these are _my_ preferences, but if you do a li'l search in this forum, you will see that automounting seem to be the grief of a rarther large proportion of posts ...
I am obviously confused about this permissions stuff. For example, I notice that my 'Data' partition has "User: root Group: disk" in /dev/sda5, whereas "$ ls -l /media" reports "user user". As I have yet to find an explanation, I can only guess at the reason for the difference. I suspect one needs to be fully Linux-certified, as it were, to know; something I will never be...
Disks not mentioned in fstab are being mounted at /media here, which has root:root already, and I will seriously consider your chmod suggestion!
Yes, Hal and PolicyKit have caused a lot of gnawing of teeth - mine included. However, right now it seems to be working fairly o.k. (again...) :-)
Last edited by whaler (2009-12-28 15:41:55)
Offline
-snip-
Disks not mentioned in fstab are being mounted at /media/'label-of-disk' here. Is that a/the mount point you would recommend for your suggestion above?
Nope - as I said - I just do not like policy kit.
Personally I would use /disk or /disk2 or /usrdisk or /bigdisk or something like that - seeing stuff under /media are often generated 'on-the-fly' - thus what _I_would have done would be:
# mkdir /disk; chown root:root /disk; chmod a+rwx /disk
and then in /etc/fstab:
/dev/sdb1 /disk jfs defaults,noatime 0 1 #assuming /dev/sdb1 is your big 2nd disk
I know many people will disagree with me - but this works for _me_
[edit] typo [/edit]
Last edited by perbh (2009-12-28 15:38:59)
Offline
(...)
I know many people will disagree with me - but this works for _me_
Thanks, perbh - it's slowly dawning on me what you mean...
Meanwhile I used lamegaptop's solution. I will keep yours as a failsafe method
Offline