Page 1 of 1

PORTEUS - saving my files on USB problem (can-t write)

Posted: 30 Jan 2013, 19:59
by testsforknowledge
somehow i cannot save files to my USB stick. 2 of them. 4GB and 16GB.
files can be read, copz to desktop, just i cannot paste files ton the USB. cant write it sais. sometimes i can, sometimes i cannot.

does someone have any idea, why so
thanx

Re: PORTEUS - saving my files on USB problem (can-t write)

Posted: 30 Jan 2013, 22:32
by Ahau
This sounds like a permissions issue, for example your drive is mounted by root but you are the guest user. Please try logging in as root (there should be an item in your applications menu to open the file manager as super user) and see if that helps; also, let us know which desktop environment (KDE, LXDE, Razor or Xfce) you are using. Finally, open a terminal, login as root (type 'su', press enter, then type 'toor' and press enter again) and provide us with the output of:

Code: Select all

cat /proc/mounts
cat /etc/mtab
My guess is that you are trying to write to the same usb drive that you are booting from, or from a flash drive that was inserted prior to booting up Porteus; in these cases, the filesystems are mounted with options that do not allow unpriveleged users (guest) from writing to the drive. If you want to change this behaviour, you can add 'users' to the mounting options with the 'mopt' cheatcode, which would add text such as this:
mopt=users,noatime,nodiratime,suid,dev,exec


to the APPEND line for your desired boot entry in /boot/porteus.cfg (Porteus version 1.2) or /boot/syslinux/porteus.cfg (Porteus version 2.0).

I hope that helps, let us know how it goes.

There is more information on that cheatcode in /boot/docs/cheatcodes.txt, and more info on each mounting option in the man page for mount.

Re: PORTEUS - saving my files on USB problem (can-t write)

Posted: 31 Jan 2013, 08:55
by fanthom
'users' mount flag does not deal with permissions. it lets guest to unmount/mount internal volumes.
in Porteus 'users' flag is missing which means that:

by default guest can:
a) mount/umount external devices
b) write to FAT/NTFS on internal devices and external devices
c) write to any linux filesystem (internal and external) if permissions allow him to do it.

by default guest cannot:
a) mount/umount internal volumes
b) write to any linux filesystem (internal and external) if permissions does not allow him to do it.

there is possibility that filesystem got corrupted so i would recommend to boot with 'fsck' cheatcode (works only for linux filesystems) or reformat usb stick.

Re: PORTEUS - saving my files on USB problem (can-t write)

Posted: 31 Jan 2013, 16:28
by Ahau
Ok, sorry I must have gotten confused there. I couldn't write to one of my flash drives as guest a while back and can't remember now if it was FAT or ext4 (probably ext4 in a folder owned by root). I'll double check the behavior in Xfce just in case udisks2 has added a wrinkle somewhere (not sure what DE testforknowledge is using yet).

Re: PORTEUS - saving my files on USB problem (can-t write)

Posted: 01 Feb 2013, 16:49
by Ahau
Ok, I tested and found that both editions (standard and Xfce) have the same read/write behavior: guest can write to FAT filesystems (internal and automounted) but not ext4/posix filesystems (just tested the top level directory, with the assumption that subfolders owned by guest can be written to, since I do this with rootcopy all the time).

One difference I did observe - Xfce edition automounts FAT partitions without 'showexec' (I removed this parameter from udisks2), but KDE automounts FAT with 'showexec'. Have you intentionally left showexec in udisks1 now that the installer script has been renamed to .com?

Re: PORTEUS - saving my files on USB problem (can-t write)

Posted: 01 Feb 2013, 17:31
by fanthom
guest can write to FAT filesystems (internal and automounted) but not ext4/posix filesystems (just tested the top level directory, with the assumption that subfolders owned by guest can be written to, since I do this with rootcopy all the time).
yes - if you create a 'test' folder and give it 777 perms or change owner to guest then he will be able to write to it.
Have you intentionally left showexec in udisks1 now that the installer script has been renamed to .com?
yes. main idea behind stripping showexec param was to let pinstaller work with automounted devices.
since we have installer executable even with showexec flag - there is no need to remove this flag from udisk.
(sorry - probably forgotten to mention that before)

Re: PORTEUS - saving my files on USB problem (can-t write)

Posted: 01 Feb 2013, 20:16
by Ahau
Ok, thanks -- I'll leave showexec in udisks2 as well so we don't confuse the issue :)

Re: PORTEUS - saving my files on USB problem (can-t write)

Posted: 21 Feb 2013, 13:16
by testsforknowledge
thank you. This somehow helped. for now. Hope it lasts. For now, this distro is best and i use it everyday.

Ahau wrote:This sounds like a permissions issue, for example your drive is mounted by root but you are the guest user. Please try logging in as root (there should be an item in your applications menu to open the file manager as super user) and see if that helps; also, let us know which desktop environment (KDE, LXDE, Razor or Xfce) you are using. Finally, open a terminal, login as root (type 'su', press enter, then type 'toor' and press enter again) and provide us with the output of:

Code: Select all

cat /proc/mounts
cat /etc/mtab
My guess is that you are trying to write to the same usb drive that you are booting from, or from a flash drive that was inserted prior to booting up Porteus; in these cases, the filesystems are mounted with options that do not allow unpriveleged users (guest) from writing to the drive. If you want to change this behaviour, you can add 'users' to the mounting options with the 'mopt' cheatcode, which would add text such as this:
mopt=users,noatime,nodiratime,suid,dev,exec


to the APPEND line for your desired boot entry in /boot/porteus.cfg (Porteus version 1.2) or /boot/syslinux/porteus.cfg (Porteus version 2.0).

I hope that helps, let us know how it goes.

There is more information on that cheatcode in /boot/docs/cheatcodes.txt, and more info on each mounting option in the man page for mount.

Re: PORTEUS - saving my files on USB problem (can-t write)

Posted: 26 Feb 2013, 14:49
by testsforknowledge
...while pc was writing files i pulled out USB stick ... is there a way to overcome this?

Re: PORTEUS - saving my files on USB problem (can-t write)

Posted: 26 Feb 2013, 21:53
by fanthom
while pc was writing files i pulled out USB stick
try booting with 'fsck' cheatcode and if that wont help then re-formatting is the only solution i'm afraid.

btw: try to avoid doing such things as you may damage not only fs but whole stick can be bricked (happened to me in the past).