Re: [Dorset] External HD - Permission denied
Clive, thanks for the directory listings. My solution would have two steps. While the external disc is mounted, run: $ sudo mkdir /media/CAW1/clive $ sudo chown clive:clive /media/CAW1/clive User clive should now be able to store anything in /media/CAW1/clive (but not directly in /media/CAW1). To tidy up, the file you've already put in /media/CAW1 can be moved into /media/CAW1/clive by $ sudo mv /media/CAW1/IMG* /media/CAW1/clive That's my solution; if it doesn't work please send the output of $ ls -lR /media I think Ralph had some simpler solutions ... Leave lost+found severely alone, for it is used (IIRC) by fsck, the program that occasionally checks the integrity of filesystems. Best wishes for your trip abroad! John -- John Palmer Preston near Weymouth, Dorset, England e-mail: jo...@bcs.org.uk (plain text preferred) website: http://www.palmyra.me.uk/ -- Next meeting: Bournemouth, Tuesday, 2013-04-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] External HD - Permission denied
Hi Ralph John Sorry for the slow response but been very busy trying to sort out a mix-up with DVLA and my driving licence photo. It turned out they gave me a wrong instruction so I'm now awaiting a new licence before going on the continent id 8 days time!! Result of the 2 instruction asked for are below:- $ ls -lR /media/CAW1 /media/CAW1: total 2512 -rw-rw-r-- 1 clive clive 2555103 Feb 23 14:33 IMG_0924_v2.JP2 drwx-- 2 root root 16384 Mar 6 13:42 lost+found /media/CAW1/lost+found: total 0 ls -l /media/CAW1 total 2512 -rw-rw-r-- 1 clive clive 2555103 Feb 23 14:33 IMG_0924_v2.JP2 drwx-- 2 root root 16384 Mar 6 13:42 lost+found Have managed to put a test file onto the external disk but can't remember how, tried several things and got it by luck. Not sure if the problem is fixed but will try the code:- sudo chown $USER:$USER /media/CAW1 chmod u=rwx,go=rx /media/CAW1 when on holiday. Will report back while away as will not have time to concentrate on it before then. *C A Wills* /Powered by Linux Open Source Software/ On 07/03/13 18:24, Ralph Corderoy wrote: Hi Clive, John's pointed out the underlying cause. John Palmer wrote: johnp@zeno:~$ ls -l /media total 4 drwxr-xr-x 4 root root 4096 2013-01-13 22:23 disc0.ext3 There are two things going on here. /dev/sdb1 /media/CAW1 ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0 A block device, /dev/sdb1, can be mounted on a `mount-point', an existing directory. The existing directory becomes hidden during the mount. It contents still exist but attempts to traverse into it jump across to the root directory on the mounted filesystem instead. On unmounting, the contents re-appear. Also hidden are the attributes of the mount-point, e.g. user and group. Instead, those of the / directory in the mounted filesystem are seen. To create something in a directory is to modify it; it can be thought of as a list of (filename, inode-number) pairs. So trying to copy something into /media/CAW1 means /media/CAW1 must give you write permission. But /media/CAW1 is really / in the mounted filesystem, so it comes down what did that live distro from which you formatted the filesystem set /'s attributes to? Have /media/CAW1 mounted and do ls -l /media/CAW1 or for a more long-winded view of its status, stat /media/CAW1 The user, group, and permissions will show who can modify the contents of its root directory. They might be root:root and only writable by owner. You can either change them, sudo chown $USER:$USER /media/CAW1 chmod u=rwx,go=rx /media/CAW1 or leave them alone and create a sub-directory that's yours, sudo mkdir /media/CAW1/clive sudo chown $USER:$USER /media/CAW1/clive Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday, 2013-04-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] External HD - Permission denied
Hi Ralph info is:- root@clive-Inspiron-1525:/home/clive# cat /proc/mounts rootfs / rootfs rw 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 udev /dev devtmpfs rw,relatime,size=1018800k,nr_inodes=214890,mode=755 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 tmpfs /run tmpfs rw,nosuid,relatime,size=410432k,mode=755 0 0 /dev/disk/by-uuid/37f2ac3d-2a23-4e5c-b1dc-d13347c5cf52 / ext4 rw,relatime,errors=remount-ro,user_xattr,acl,barrier=1,data=ordered 0 0 none /sys/fs/fuse/connections fusectl rw,relatime 0 0 none /sys/kernel/debug debugfs rw,relatime 0 0 none /sys/kernel/security securityfs rw,relatime 0 0 none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0 none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0 /dev/sda6 /home ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0 binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0 gvfs-fuse-daemon /home/clive/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0 /dev/sdb1 /media/CAW1 ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0 root@clive-Inspiron-1525:/home/clive# ^C Tuesdays meeting was very noisy and football was on in all rooms!! 7 attended and you could only converse with your immediate neighbour but I enjoyed the meeting. Won't be at April's though. *C A Wills* /Powered by Linux Open Source Software/ On 07/03/13 00:53, Ralph Corderoy wrote: Hi Clive, Now recognised when plugged in, but it will not accept copying a file onto it, reports that 'Copying file error - Permission denied'. Checked on main PC, same result. What's the output of cat /proc/mounts Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday, 2013-04-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] External HD - Permission denied
On 07/03/13 08:25, C A Wills wrote: Hi Ralph info is:- root@clive-Inspiron-1525:/home/clive# cat /proc/mounts . /dev/disk/by-uuid/37f2ac3d-2a23-4e5c-b1dc-d13347c5cf52 / ext4 rw,relatime,errors=remount- /dev/sda6 /home ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0 /dev/sdb1 /media/CAW1 ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0 For those of us not so hot on this stuff, is it related to nosuid,nodev and then what do we do? Peter -- Next meeting: Bournemouth, Tuesday, 2013-04-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] External HD - Permission denied
It'll be to do with permissions in PolicyKit to disallow users from doing so. There are a few solutions: 1. Fix in policykit to allow you to edit volumes (the tool depends on your DE, it's usually in the relevant settings tool). 2. Format to VFAT and it will automount as user 3. Edit the fstab and add it in, with an option of user,auto 4. Do everything as root on the disk. Cheers, Dan -- Next meeting: Bournemouth, Tuesday, 2013-04-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] External HD - Permission denied
Hi Peter, /dev/sdb1 /media/CAW1 ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0 For those of us not so hot on this stuff, is it related to nosuid,nodev and then what do we do? It's not, no. :-) mount(8) explains that nosuid means setuid, set user ID, and setgid, group, permission bits should be ignored and nodev stops inodes that are character or block devices from being treated as such. IOW, don't trust the contents of the filesystem too much. Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday, 2013-04-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] External HD - Permission denied
Hi Clive, John's pointed out the underlying cause. John Palmer wrote: johnp@zeno:~$ ls -l /media total 4 drwxr-xr-x 4 root root 4096 2013-01-13 22:23 disc0.ext3 There are two things going on here. /dev/sdb1 /media/CAW1 ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0 A block device, /dev/sdb1, can be mounted on a `mount-point', an existing directory. The existing directory becomes hidden during the mount. It contents still exist but attempts to traverse into it jump across to the root directory on the mounted filesystem instead. On unmounting, the contents re-appear. Also hidden are the attributes of the mount-point, e.g. user and group. Instead, those of the / directory in the mounted filesystem are seen. To create something in a directory is to modify it; it can be thought of as a list of (filename, inode-number) pairs. So trying to copy something into /media/CAW1 means /media/CAW1 must give you write permission. But /media/CAW1 is really / in the mounted filesystem, so it comes down what did that live distro from which you formatted the filesystem set /'s attributes to? Have /media/CAW1 mounted and do ls -l /media/CAW1 or for a more long-winded view of its status, stat /media/CAW1 The user, group, and permissions will show who can modify the contents of its root directory. They might be root:root and only writable by owner. You can either change them, sudo chown $USER:$USER /media/CAW1 chmod u=rwx,go=rx /media/CAW1 or leave them alone and create a sub-directory that's yours, sudo mkdir /media/CAW1/clive sudo chown $USER:$USER /media/CAW1/clive Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday, 2013-04-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
[Dorset] External HD - Permission denied
Hi all Today I bought a small external HD from Novatec in Portsmouth, to back-up my laptop before re-formatting and re-installing the laptop. Plugged it in and it was not recognised by the system, so checked with Gparted which confirmed it was not formatted. Formatted drive to EXT4 and gave it a label 'CAW1'. For the above I used a MINT 14 'live disk' with Gparted and checked the HD was not mounted. Now recognised when plugged in, but it will not accept copying a file onto it, reports that 'Copying file error - Permission denied'. Checked on main PC, same result. Right click on disk and checked permissions tab; reports are 'permissions not available' or word to that effect. How do I make the disk available to any person or machine please? At the moment it's a useless block! Not had this before when formatting a HD. Is it 'ROOT' that's the problem? -- *Clive Wills* /Powered by Linux Open Source Software/// -- Next meeting: Bournemouth, Tuesday, 2013-04-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] External HD - Permission denied
Hi Clive, Now recognised when plugged in, but it will not accept copying a file onto it, reports that 'Copying file error - Permission denied'. Checked on main PC, same result. What's the output of cat /proc/mounts Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday, 2013-04-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue