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

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
Post Reply
testsforknowledge
Black ninja
Black ninja
Posts: 42
Joined: 07 Jan 2013, 16:44
Distribution: PORTEUS
Location: slovenia

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

Post#1 by testsforknowledge » 30 Jan 2013, 19:59

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

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

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

Post#2 by Ahau » 30 Jan 2013, 22:32

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.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

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

Post#3 by fanthom » 31 Jan 2013, 08:55

'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.
Please add [Solved] to your thread title if the solution was found.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

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

Post#4 by Ahau » 31 Jan 2013, 16:28

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).
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

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

Post#5 by Ahau » 01 Feb 2013, 16:49

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?
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

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

Post#6 by fanthom » 01 Feb 2013, 17:31

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)
Please add [Solved] to your thread title if the solution was found.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

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

Post#7 by Ahau » 01 Feb 2013, 20:16

Ok, thanks -- I'll leave showexec in udisks2 as well so we don't confuse the issue :)
Please take a look at our online documentation, here. Suggestions are welcome!

testsforknowledge
Black ninja
Black ninja
Posts: 42
Joined: 07 Jan 2013, 16:44
Distribution: PORTEUS
Location: slovenia

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

Post#8 by testsforknowledge » 21 Feb 2013, 13:16

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.

testsforknowledge
Black ninja
Black ninja
Posts: 42
Joined: 07 Jan 2013, 16:44
Distribution: PORTEUS
Location: slovenia

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

Post#9 by testsforknowledge » 26 Feb 2013, 14:49

...while pc was writing files i pulled out USB stick ... is there a way to overcome this?

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

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

Post#10 by fanthom » 26 Feb 2013, 21:53

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).
Please add [Solved] to your thread title if the solution was found.

Post Reply