
Hello, I was trying to backup some data from a Ubuntu 12.04 linux installation when all of a sudden the external hard drive I was using (My Passport 300Gb) changed to read only.I have spent about 2 hours trying to set the permission back to read write without success.For example I have tried the following command sudo chmod 755 "/media/My Passport" and sudo chmod 777 "/media/My Passport" the message given both times was chmod: changing permissions of `/media/My Passport': Read-only file system I'd also like to mention that I do not recommend Ubuntu 12.04 to anyone as it has far too many bugs to be usable.Linux Mint is much better for example. I hope someone can help me to get my external drive back to read write mode. regards Peter

On 18/08/12 15:54, Peter Wolf wrote:
Hello, I was trying to backup some data from a Ubuntu 12.04 linux installation when all of a sudden the external hard drive I was using (My Passport 300Gb) changed to read only.I have spent about 2 hours trying to set the permission back to read write without success.For example I have tried the following command
sudo chmod 755 "/media/My Passport"
and
sudo chmod 777 "/media/My Passport"
the message given both times was
chmod: changing permissions of `/media/My Passport': Read-only file system
I'd also like to mention that I do not recommend Ubuntu 12.04 to anyone as it has far too many bugs to be usable.Linux Mint is much better for example.
I hope someone can help me to get my external drive back to read write mode.
regards Peter
_______________________________________________ luv-beginners mailing list luv-beginners@lists.luv.asn.au http://lists.luv.asn.au/listinfo/luv-beginners
I suspect that the filesystem is not the problem. Just run the mount command on it's own with no arguments to see how your filesystems are currently mounted. If my guess is correct, you will find it is mounted in "ro" mode (Read Only). What you will need to do is to remount the filesystem in rw mode (read/write). sudo mount -o remount,rw '/media/My Passport' Maybe the drive was not cleanly shut down and it therefore needs an fsck check on the filesystem. Under those circumstances, it is not unreasonable for the drive to be mounted read only, as any corruption on the filesystem could be made much worse by further writes. (A clip from /var/log/dmesg on my ubuntu system. "EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro" which shows that the filesystem is configured to remount in ro mode should errors in the filesystem be discovered at mount time.) I hope that gives you a few avenues to check. Regards, Morrie.

On 18/08/12 17:17, Morrie Wyatt wrote:
On 18/08/12 15:54, Peter Wolf wrote:
Hello, I was trying to backup some data from a Ubuntu 12.04 linux installation when all of a sudden the external hard drive I was using (My Passport 300Gb) changed to read only.I have spent about 2 hours trying to set the permission back to read write without success.For example I have tried the following command
sudo chmod 755 "/media/My Passport"
and
sudo chmod 777 "/media/My Passport"
the message given both times was
chmod: changing permissions of `/media/My Passport': Read-only file system
I'd also like to mention that I do not recommend Ubuntu 12.04 to anyone as it has far too many bugs to be usable.Linux Mint is much better for example.
I hope someone can help me to get my external drive back to read write mode.
regards Peter
_______________________________________________ luv-beginners mailing list luv-beginners@lists.luv.asn.au http://lists.luv.asn.au/listinfo/luv-beginners I suspect that the filesystem is not the problem.
Just run the mount command on it's own with no arguments to see how your filesystems are currently mounted.
If my guess is correct, you will find it is mounted in "ro" mode (Read Only).
What you will need to do is to remount the filesystem in rw mode (read/write).
sudo mount -o remount,rw '/media/My Passport'
Maybe the drive was not cleanly shut down and it therefore needs an fsck check on the filesystem.
Under those circumstances, it is not unreasonable for the drive to be mounted read only, as any corruption on the filesystem could be made much worse by further writes.
(A clip from /var/log/dmesg on my ubuntu system.
"EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro"
which shows that the filesystem is configured to remount in ro mode should errors in the filesystem be discovered at mount time.)
I hope that gives you a few avenues to check.
Regards, Morrie.
_______________________________________________ luv-beginners mailing list luv-beginners@lists.luv.asn.au http://lists.luv.asn.au/listinfo/luv-beginners
Hello Morrie, Thanks for the reply.I did have trouble with the power supply to the external hard drive so it was probably not cleanly shutdown.However after running a mount command this is what I get. /dev/sdb1 on /media/My Passport type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks) I tried umount /dev/sdb1 sudo fsck /dev/sdb1 however the problem remained I also tried sudo mount -o remount,rw '/media/My Passport' with no change. I am hoping the problem can be fixed but I am not sure what to try next. regards Peter

Hi Peter It will help people to help you if, instead of writing vague things like "the problem remained", you present us with an exact *unedited* contiguous copy and paste from a terminal showing both 1) each entire command you enter 2) the *entire* response to it So that we can see exactly what is going on. It is also less effort for you. At this point, it would be interesting to see that information for: 1) The original "backup some data" attempt in your first message. Exactly what command do you enter, and what is the response. Until you show that, we have no idea what you are doing or seeing. 2) A simple 'mount' command. 3) 'sudo fsck /dev/sdb1' Exactly what was the response. Does your system auto mount this drive? Assuming it is usb connected, have you tried unmounting it and then removing and re-inserting the usb connection. Use the verbose -v option for umount. Also, when doing this test you might show us 'ls -l /media' twice, once with the drive disconnected and then with it disconnected. Also, what do you see in dmesg after doing this. I don't have ubuntu so am not sure of the file, perhaps /var/log/dmesg or the command 'dmesg'. The cause of what you are seeing is more likely something to do with how the drive is mounted rather than the actual filesystem permissions. So I wouldn't be fooling with chmod at this stage. Hope this helps :) David

On 18/08/12 18:44, David wrote:
Hi Peter
It will help people to help you if, instead of writing vague things like "the problem remained", you present us with an exact *unedited* contiguous copy and paste from a terminal showing both 1) each entire command you enter 2) the *entire* response to it So that we can see exactly what is going on. It is also less effort for you.
At this point, it would be interesting to see that information for: 1) The original "backup some data" attempt in your first message. Exactly what command do you enter, and what is the response. Until you show that, we have no idea what you are doing or seeing. 2) A simple 'mount' command. 3) 'sudo fsck /dev/sdb1' Exactly what was the response.
Does your system auto mount this drive? Assuming it is usb connected, have you tried unmounting it and then removing and re-inserting the usb connection. Use the verbose -v option for umount.
Also, when doing this test you might show us 'ls -l /media' twice, once with the drive disconnected and then with it disconnected. Also, what do you see in dmesg after doing this. I don't have ubuntu so am not sure of the file, perhaps /var/log/dmesg or the command 'dmesg'.
The cause of what you are seeing is more likely something to do with how the drive is mounted rather than the actual filesystem permissions. So I wouldn't be fooling with chmod at this stage.
Hope this helps :) David
Hello David, The exact problem is that when using Nautilus or Caja to copy files to my external hard drive the "paste" option cannot be selected.I assumed this was due to permissions not being set properly but maybe this is not the case.Anyway I have decided to back up th data on the external hard drive in question and then format it.Thanks everyone for your help. regards Peter.

It could be a permissions problem if perhaps: 1) There are some original directories/files that you do not have permission to overwrite. 2) You copy/pasted them to the external drive, thereby creating a first copy with identical permissions. 3) You tried to do it again, which would involve overwriting the first copies. This might fail because you don't have permission to overwrite them. You could use chmod to create a simple minimal test case yourself to investigate this scenario. Don't hestitate to ask again if necessary :) On 18/08/2012, Peter Wolf <freakcycle@optusnet.com.au> wrote:
On 18/08/12 18:44, David wrote:
Hi Peter
It will help people to help you if, instead of writing vague things like "the problem remained", you present us with an exact *unedited* contiguous copy and paste from a terminal showing both 1) each entire command you enter 2) the *entire* response to it So that we can see exactly what is going on. It is also less effort for you.
At this point, it would be interesting to see that information for: 1) The original "backup some data" attempt in your first message. Exactly what command do you enter, and what is the response. Until you show that, we have no idea what you are doing or seeing. 2) A simple 'mount' command. 3) 'sudo fsck /dev/sdb1' Exactly what was the response.
Does your system auto mount this drive? Assuming it is usb connected, have you tried unmounting it and then removing and re-inserting the usb connection. Use the verbose -v option for umount.
Also, when doing this test you might show us 'ls -l /media' twice, once with the drive disconnected and then with it disconnected. Also, what do you see in dmesg after doing this. I don't have ubuntu so am not sure of the file, perhaps /var/log/dmesg or the command 'dmesg'.
The cause of what you are seeing is more likely something to do with how the drive is mounted rather than the actual filesystem permissions. So I wouldn't be fooling with chmod at this stage.
Hope this helps :) David
Hello David, The exact problem is that when using Nautilus or Caja to copy files to my external hard drive the "paste" option cannot be selected.I assumed this was due to permissions not being set properly but maybe this is not the case.Anyway I have decided to back up th data on the external hard drive in question and then format it.Thanks everyone for your help.
regards Peter.
_______________________________________________ luv-beginners mailing list luv-beginners@lists.luv.asn.au http://lists.luv.asn.au/listinfo/luv-beginners

On Sat, Aug 18, 2012 at 10:26 AM, David <bouncingcats@gmail.com> wrote:
It could be a permissions problem if perhaps: 1) There are some original directories/files that you do not have permission to overwrite. 2) You copy/pasted them to the external drive, thereby creating a first copy with identical permissions. 3) You tried to do it again, which would involve overwriting the first copies. This might fail because you don't have permission to overwrite them.
I also had a similar problem but I know in my case it was user misunderstanding :) . I have a USB Drive that is permanently attached to a laptop in my radio shack for storing my RAW camera images. I created mount points for the 4 partitions on the drive (In Lubuntu 12.04) when I installed the OS in /mnt so it isnt auto magicially mounted in /media by the os as I don't unplug it and after the install I could not write to the drive. It turned out that the permissions for owner and group was set as root so a quick chown of the mount points fixed the problem. More then likely not related to your problem but an interesting side note for anyone doing the same thing as I did at install. -- Mark "Hiddensoul" Clohesy Mob Phone: (+61) 406 417 877 Email: hiddensoul@twistedsouls.com G-Talk: mark.clohesy@gmail.com - www.shed.twistedsouls.com - GNU/Linux.. Linux Counter #457297 "I would love to change the world, but they won't give me the source code" "Linux is user friendly...its just selective about who its friends are" "Never underestimate the bandwidth of a V8 station wagon full of tapes hurtling down the highway" "The difference between e-mail and regular mail is that computers handle e-mail, and computers never decide to come to work one day and shoot all the other computers"

On 18/08/2012, Hiddensoul (Mark Clohesy) <hiddensoul@twistedsouls.com> wrote:
On Sat, Aug 18, 2012 at 10:26 AM, David <bouncingcats@gmail.com> wrote:
It could be a permissions problem if perhaps:
[...]
I also had a similar problem but I know in my case it was user
[...] Like you, I was trying to give Peter some other possibilites to consider, but I distracted myself imagining his GUI scenario and temporarily forgot that he wrote this in his OP: On 18/08/2012, Peter Wolf <freakcycle@optusnet.com.au> wrote:
the message given both times was chmod: changing permissions of `/media/My Passport': Read-only file system
I think the "read only file system" part of that message indicates that at that time, for whatever reason, his drive filesystem was not mounted for writing. So I still think that it is most likely a mount problem, not incorrect permissions. Anyway, I find that mysterious problems not fixed usually return, so ... :)

On 18/08/12 20:26, David wrote:
It could be a permissions problem if perhaps: 1) There are some original directories/files that you do not have permission to overwrite. 2) You copy/pasted them to the external drive, thereby creating a first copy with identical permissions. 3) You tried to do it again, which would involve overwriting the first copies. This might fail because you don't have permission to overwrite them.
Hello David and others, Well you were right about the problem not going away.I created a new partition table on the disk,a new partition and formatted it to ext2.The disk seems to be physically ok,however I cannot write to it without root permission.I would like to know what command to use to be able to write to it without root permission.Below is an example of commands that I have been using and their responses. peter@peter-System-Product-Name ~ $ mount /dev/sda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) gvfs-fuse-daemon on /home/peter/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=peter) /dev/sr0 on /media/GROOVE_ARMADA type udf (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,umask=0077,dmode=0500,uhelper=udisks) /dev/sdg1 on /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae type ext2 (rw,nosuid,nodev,uhelper=udisks) peter@peter-System-Product-Name ~ $ ls /media 5a1069e0-28e6-485b-bb23-9bb6eb81f2ae floppy floppy0 GROOVE_ARMADA peter@peter-System-Product-Name ~ $ chmod 755 /media/5a* chmod: changing permissions of `/media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae': Operation not permitted peter@peter-System-Product-Name ~ $ sudo chmod 755 /media/5a* peter@peter-System-Product-Name ~ $ cp whimp.aup /media/5a* cp: cannot create regular file `/media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae/whimp.aup': Permission denied peter@peter-System-Product-Name ~ $ ls /media/5a* lost+found peter@peter-System-Product-Name ~ $ sudo cp whimp.aup /media/5a* peter@peter-System-Product-Name ~ $ ls /media/5a* lost+found whimp.aup I am using Linux Mint 13.When I right click the hard disk icon and lookup permissions it says that they cannot be determined.The disk auto mounts when plugged in. regards Peter
_______________________________________________ luv-beginners mailing list luv-beginners@lists.luv.asn.au http://lists.luv.asn.au/listinfo/luv-beginners
-- Linux Mint User http://www.linuxmint.com/

Peter, On 2012-08-20 09:49, Peter Wolf wrote: [...]
peter@peter-System-Product-Name ~ $ mount /dev/sda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) gvfs-fuse-daemon on /home/peter/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=peter) /dev/sr0 on /media/GROOVE_ARMADA type udf (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,umask=0077,dmode=0500,uhelper=udisks) /dev/sdg1 on /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae type ext2 (rw,nosuid,nodev,uhelper=udisks) peter@peter-System-Product-Name ~ $ ls /media 5a1069e0-28e6-485b-bb23-9bb6eb81f2ae floppy floppy0 GROOVE_ARMADA peter@peter-System-Product-Name ~ $ chmod 755 /media/5a* chmod: changing permissions of `/media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae': Operation not permitted peter@peter-System-Product-Name ~ $ sudo chmod 755 /media/5a* peter@peter-System-Product-Name ~ $ cp whimp.aup /media/5a* cp: cannot create regular file `/media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae/whimp.aup': Permission denied peter@peter-System-Product-Name ~ $ ls /media/5a* lost+found peter@peter-System-Product-Name ~ $ sudo cp whimp.aup /media/5a* peter@peter-System-Product-Name ~ $ ls /media/5a* lost+found whimp.aup
In order for us to be able to fully see and understand the problem, your 'ls' commands should all be long listings (ls -l) so that we can see the permissions that are actually set. Based on what I can already see though, it's likely that the root of the disk you're trying to write to is owned and grouped by root (ls -l will confirm), and you're chmodding to 755, which translates to rwxr-xr-x, meaning that only the owner can write to the disk. For everybody to be able to write to the disk you need to 'chmod 777', or for just you to be able to write to it, you need to 'chown $USER'. Hope this helps. -- Regards, Matthew Cengia

Hi Peter How are you going with your problem? I do not have Ubuntu here and do not know how it handles auto mounting so I hoped someone better informed about that than me would help you. Anyway I will try to give you a solution that avoids dealing with the automount. The following assumes that 1) Nothing has changed since your previous message. 2) You are the only user on your system. If these assumptions are untrue, the following may be misleading. Also the following is untested, so use at your own risk. But there's not much risk if you haven't been able to save anything useful on the disk yet. With the drive connected, I imagine you will currently see something like this: $ ls -l /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae drwx------. 2 root root 16384 2010-06-20 17:14 lost+found -rwxr-xr-x. 1 root root 4096 2011-02-20 17:20 whimp.aup The permissions on lost+found might be different depending on if you have changed them with previous attempts. It is a system directory only used if the filesystem develops errors. Assuming you are the only user on this system, I imagine what you want to achieve is something like this: $ ls -l /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae drwx------. 2 root root 16384 2010-06-20 17:14 lost+found -rw-rw----. 1 peter peter 4096 2011-02-20 17:20 any_file_you_put_there drwxrwx---. 2 peter peter 4096 2011-02-20 17:20 any_subdirectory_you_put_there Assuming that nothing has changed since your previous message, and in particular that there are no subdirectories on the drive yet, you can achieve that with this sequence of commands: $ sudo chown -Rc peter:peter /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae $ sudo chmod -c 660 /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae/any_file_you_put_there $ sudo chmod -c 770 /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae/any_subdirectory_you_put_there $ sudo chown -c root:root /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae/lost+found $ sudo chmod -c 700 /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae/lost+found There are 5 single-line commands, so eliminate any extra linewrap introduced by email. Where I have written any_file_you_put_there, you can either specify the name exactly or use a glob that matches only files. Same for subdirectories, if any. If there are none, skip that command. To save typing, press tab key after /media/5a and it should automatically expand to /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae Hopefully that will achieve what you need. How things go after that will depend on the automount umask, hopefully its default will be suitable. When you have it working, or have further problems, please show us the output of: $ umask $ ls -lR /media/5a1069e0-28e6-485b-bb23-9bb6eb81f2ae There is a little bit of info here: http://ubuntugenius.wordpress.com/2012/06/07/ubuntu-hardware-permissions-how... If you do some google research yourself, which I'd recommend, you can ignore the extra issues of vfat or ntfs filesystems, because you have chosen to format your drive as ext2 which directly implements unix permissions. Personally, I think ext3 or ext4 would be a more suitable and modern choice for an external usb backup hard drive. Also, please do not ask questions and then disappear without giving feedback to people who try to assist you. Hope this helps.

On 21/08/12 02:10, David wrote:
Hi Peter
How are you going with your problem? I do not have Ubuntu here and do not know how it handles auto mounting so I hoped someone better informed about that than me would help you. Anyway I will try to give you a solution that avoids dealing with the automount.
Hello David, Thanks for your help and that of everyone else.The drive is now working as before and packed away with over 100GB of data on it. The problem was an ownership problem and I was not aware of the effects that has on devices or familiar with the chown command. sudo chown $USER /media/5a* worked fine. The reason I have sometimes not given feedback to people on here is due to avoiding arguments.I was told by a long time member of this group to avoid arguing with people on here.Also I have personal problems which I don't want to go into.I am doing the best I can.My actions are certainly not out of disrespect. regards Peter -- Linux Mint User http://www.linuxmint.com/

Hi Peter Good to hear it is now working for you. And thanks for letting us know. Cheers David
participants (5)
-
David
-
Hiddensoul (Mark Clohesy)
-
Matthew Cengia
-
Morrie Wyatt
-
Peter Wolf