Navigatrix.net - A Voyager's Companion
http://navigatrix.net/

[solved] read only writes for usb
http://navigatrix.net/viewtopic.php?f=4&t=378
Page 1 of 1

Author:  nautic [ 23 Apr 2013, 04:16 ]
Post subject:  [solved] read only writes for usb

I've encountered randomly and not only with Navigatrix a problem with transferring files via usb-stick, i've probe plenty and with different file systems. When try to write on it linux report that it is read-only file-system. Some times it is very hard to find a way to transfer some...even via sudo nautilus
That is some of what it writes:
Code:
** (pcmanfm:3230): DEBUG: try automount
** (pcmanfm:3230): DEBUG: mount_fn
** (pcmanfm:3230): DEBUG: mount callback!!
** (pcmanfm:3230): DEBUG: on_mount_action_finished
** (pcmanfm:3230): DEBUG: device_changed: /org/freedesktop/UDisks/devices/sdb1
** (pcmanfm:3230): DEBUG: on_idle: 1
** (pcmanfm:3230): DEBUG: g_udisks_device_changed
** (pcmanfm:3230): DEBUG: unable to load icon . GThemedIcon application-octet-stream gnome-mime-application-octet-stream application-x-generic
** (pcmanfm:3230): DEBUG: unable to load icon . GThemedIcon application-x-pkcs12 gnome-mime-application-x-pkcs12 application-x-generic
** (pcmanfm:3230): DEBUG: unable to load icon . GThemedIcon application-x-sharedlib gnome-mime-application-x-sharedlib application-x-generic
** (pcmanfm:3230): DEBUG: total size to copy: 1437230005
** (pcmanfm:3230): DEBUG: FmJob error: Error creating directory: Read-only file system
** (pcmanfm:3230): DEBUG: file operation is finished!

And may be it could be helpful, when start sudo nautilus and it locates on my user directory there is pop-up that "access denied", but than i can enter this directory and write files.

Author:  Moe [ 23 Apr 2013, 08:51 ]
Post subject:  Re: read only writes for usb

The file manager in Navigatrix is PCManFM. Nautilus is another file manager that is not installed in Navigatrix. While it uses some of the same libraries as PCManFM Nautilus takes additional packages for it to work and display properly. You might not have all of them installed.

Try sudo pcmanfm or select Tools> Open Current Folder as Root from a regular instance of PCManFM. The key icon shows you have super powers.
Attachment:
root_pcmanfm.png
root_pcmanfm.png [ 85.75 KiB | Viewed 9624 times ]


If you've changed something and are having trouble with automounting; try ticking the first two boxes in the PCManFM's Preferences section.
Attachment:
pcmanfm.png
pcmanfm.png [ 92.6 KiB | Viewed 9630 times ]
I find selecting the third option irritating.

On a multi-user system the 'home' directory can be protected from anybody who is not the owner of that home directory. This setting for a multi-user/single machine on a boat is an impediment. However, a left over artifact is Permission denied when you are acting as Root and and enter a user home directory. But since Root has total access, you just click through this advisory. I find this vestigial behaviour irritating as well..but it is not a user selectable option. I'm all ears if someone knows how to remove it.

Author:  nautic [ 23 Apr 2013, 16:48 ]
Post subject:  Re: read only writes for usb

Moe, thanks for your explanation! I had third check box ticked by default and released it.

Author:  nautic [ 24 Apr 2013, 06:03 ]
Post subject:  Re: read only writes for usb

I any way can't, it reports "switch user command is not set"
Even when open folder as a root, reports "Error creating directory: Read-only file system" - and it happens only with some sticks, not with all...i do not understand what is happening
Even when open in terminal (F4)
Image

Author:  Moe [ 24 Apr 2013, 09:37 ]
Post subject:  Re: read only writes for usb

switch user command is not set is what happens when you are using PCManFM as Root and you try to "Open Current Folder as Root"

I get to the rest in a bit.

There are some filesystems that are read only (like CDs, DVDs, squashfilesystems, etc.) and then there are others that are read only, but can be changed to read/write.

I need to organize my thoughts so I'll get back to you.

Author:  Moe [ 25 Apr 2013, 06:43 ]
Post subject:  Re: read only writes for usb

What is this on...a USB?

Try ls -l /media/AP_FLASH > ~/Desktop/r-o_problem.txt

It will put the output into a text file on your Desktop. You can leisurely view/edit them and post the content so we can look at permissions and ownership like:
Code:
drwxrwx-w-   2 nxuser nxuser         4096 Sep 19  2012 Charts
drwxrwxrwx  17 nxuser nxuser         4096 Feb 26 13:12 Goot
drwxrwx-w-   6 nxuser nxuser         4096 Jan 31  2010 Language
drwxrwx-w-   2 nxuser nxuser         4096 Jan 22  2009 Look Here Because You Need Help
drwx------   2 root  root          4096 Mar  9 13:09 lost+found
-rw-------   1 nxuser nxuser   2522513408 Dec 30  2011 Some_bigass_file.iso
drwxrwx-w-   2 nxuser nxuser         4096 Mar 25  2011 Misc
drwxrwxr-x  40 nxuser nxuser         4096 Apr 24 19:04 more+music
drwxrwx-w-   4 nxuser nxuser         4096 Sep 22  2009 Pool Books
-rw-rw--w-   1 nxuser nxuser  19919798272 Feb  2 15:46 sda1.dd
-rw-rw--w-   1 nxuser nxuser  21451530240 Apr 23 13:04 sda2.dd
-rw-rw--w-   1 nxuser nxuser 104867540992 Apr 11 16:46 sda3.dd
drwxrwx-w-  10 nxuser nxuser         4096 May 26  2011 Software
drwxrwx-w-   7 nxuser nxuser         4096 Sep 19  2012 spareme
drwxrwxr-x   6 nxuser nxuser         4096 Mar 26 22:30 stuff

Author:  Moe [ 29 Apr 2013, 02:01 ]
Post subject:  Re: read only writes for usb

It just hit me what's going on...I'm brain-dead. However, for you the prognosis is better.

Your read only problem is that the directory (and files) might have a particular attribute set.

This attribute is called...the sticky-bit. When it's set even a drunk with root password weilding god-like powers can't even change it and trash a system. "...oops."

For example, I take a directory and create one inside called "sticky". If I set the stickybit (chattr +i <name>) it becomes a read only directory/file to everyone on the planet...even root.

lsattr will list the attributes and you see the stickybit sticking up a bit.

I can't force removal of the directory (and contents). I can't change it. I can't delete. I can only read it and weep in joy or sorrow that it is one thing that will no change.

However, if I reset the stickybit (chattr -i <name>) and then I can remove...or add to the contents of the directory/file. Permanently immutable is not really either....
Code:
root@mini:/mnt# ls -lisa
total 8
3145729 4 drwxr-xr-x  2 root root 4096 Apr 29 16:48 .
      2 4 drwxr-xr-x 26 root root 4096 Apr 29 16:12 ..
root@mini:/mnt# mkdir sticky
root@mini:/mnt# ls -lisa
total 12
3145729 4 drwxr-xr-x  3 root root 4096 Apr 29 16:49 .
      2 4 drwxr-xr-x 26 root root 4096 Apr 29 16:12 ..
3145733 4 drwxr-xr-x  2 root root 4096 Apr 29 16:49 sticky
root@mini:/mnt# chattr +i sticky/
root@mini:/mnt# rm -rf sticky/
rm: cannot remove ‘sticky/’: Operation not permitted
root@mini:/mnt# lsattr
----i--------e-- ./sticky
root@mini:/mnt# chattr -i sticky/
root@mini:/mnt# lsattr
-------------e-- ./sticky
root@mini:/mnt# rm -rf sticky/
root@mini:/mnt# ls -lisa
total 8
3145729 4 drwxr-xr-x  2 root root 4096 Apr 29 16:53 .
      2 4 drwxr-xr-x 26 root root 4096 Apr 29 16:12 ..
root@mini:/mnt#

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/