delete as root

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
prolinux
Ronin
Ronin
Posts: 1
Joined: 21 Feb 2013, 19:26
Distribution: xubuntu
Location: Denmark

delete as root

Post#1 by prolinux » 27 Oct 2013, 13:14

When I delete as root I would prefer not to transfer to a bin but really delete. Thanks for a nice distro: fast, easy to change to my needs and with good hardware support. Thanks for quick and good help some time ago when I wanted to incorporate another root password into one of the modules.

Kindly Ove Overgaard

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

Re: delete as root

Post#2 by fanthom » 27 Oct 2013, 14:24

which DE are you using?
if LXDE then it's quite straight forward:
open pcmanfm (as root) -> Edit -> Preferences -> unmark 'Move deleted files to "trash bin" instead of ereasing from disk'
Please add [Solved] to your thread title if the solution was found.

tome
Contributor
Contributor
Posts: 577
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: delete as root

Post#3 by tome » 01 Nov 2013, 22:16

Is this possible to enable Trash for guest like for root? For root and on removable devices for every user Trash is in / but for local drives Trash for guest is in .../.local/share/. I want to have Desktop and Trash in real filesystem (link or magic folder) but then I can't move files to Trash because guest is in aufs, similar problem is for another local partitions. Possible solution for unix filesystems is changes:EXIT and saving Desktop and Trash (config file for exitchanges in /etc) but I have too many files on my ntfs to format it - what must I modify to save changes on ntfs or fat like for unix fs beside porteussave.dat?

User avatar
brokenman
Site Admin
Site Admin
Posts: 5657
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: delete as root

Post#4 by brokenman » 02 Nov 2013, 14:30

what must I modify to save changes on ntfs or fat like for unix fs beside porteussave.dat?
This will end badly. For one thing these file systems don't honour symlinks or case in the way that we use them. Trial and error has shown in the past that this doesn't work very well, so Porteus now doesn't offer the option. You could tweak the startup scripts to allow it but you will meet corrupt changes eventually.
How do i become super user?
Wear your underpants on the outside and put on a cape.

tome
Contributor
Contributor
Posts: 577
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: delete as root

Post#5 by tome » 02 Nov 2013, 15:28

Thanks, NTFS (and even Windows7) supports symlinks in contrast to FAT. Now I have guest folder in NTFS and it works without problems (wine must be linked to mounted container or activated module) but I prefer fresh mode for guest config files. By the way winrar for unix fs has interesting compression method - it creates main folders with name of permissions for everything in it. Maybe something similar is possible to do for Porteus (NTFS).

User avatar
brokenman
Site Admin
Site Admin
Posts: 5657
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: delete as root

Post#6 by brokenman » 02 Nov 2013, 21:38

Sorry, yes ntfs supports these.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: delete as root

Post#7 by fanthom » 03 Nov 2013, 09:41

ntfs nad fat does not support linux permissions so i'll never allow to save directly on them (posixovl is outdated and does not work with recent version of aufs anymore).

regarding trash:
must admit that it's a bit of mystery how it works. from my little experience i can say that it allows to move files to trash only from root tree but not from /mnt/sdXY (and doesn't matter if partition is formatted with linux or windows filesystem).
i have tried 'always fresh' and with changes saved on /mnt/sda1 and still got the message saying 'underlying filesystem does not support this operation'.

i'm out of clues - Ahau please help.
Please add [Solved] to your thread title if the solution was found.

tome
Contributor
Contributor
Posts: 577
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: delete as root

Post#8 by tome » 06 Nov 2013, 17:45

i have tried 'always fresh' and with changes saved on /mnt/sda1 and still got the message saying 'underlying filesystem does not support this operation'.
Try as root and with other file manager (without Spacefm).

I will try to make new user account guest2 that will be linked to real fs and replace guest2 folders (without Desktop and Trash) with links to guest folders. So trash should work and settings for guest2 should be fresh. But dconf in .cache must not be linked (to many cpu resources) and in lxde I have only run and logout entry in start-menu so I will try find what must not be also linked.

tome
Contributor
Contributor
Posts: 577
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: delete as root

Post#9 by tome » 07 Nov 2013, 09:09

... I loaded during boot my module with settings so dconf and menus in .cache folder should be refreshed (in this way) and then can be linked. I have also replaced

Code: Select all

guest:x:1000:1000::/home/guest:/bin/bash
with

Code: Select all

guest:x:1000:1000::/home/guest2:/bin/bash
in /etc/passwd to have correct permissions. 8)

tome
Contributor
Contributor
Posts: 577
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: delete as root

Post#10 by tome » 14 Nov 2013, 20:46

In /home/.../.config/libfm/libfm.conf can be disabled Trash for pcmanfm on ntfs and fat partitions:

Code: Select all

no_usb_trash=1

tome
Contributor
Contributor
Posts: 577
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: delete as root

Post#11 by tome » 18 Nov 2013, 10:35

Strange:
If I use magic folders for Desktop then pcmanfm deletes files like for usb devices but trash (icon) is all time empty.
If I use changes= or changes=EXIT: cheatcodes and want delete files from this partitions (not from aufs) spacefm allow delete only files but not folders and in pcmanfm I can only restore files but not move to trash.

tome
Contributor
Contributor
Posts: 577
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: delete as root

Post#12 by tome » 26 Nov 2013, 20:55

if permissions for / are "correct" (test - if guest can save files to root tree) then trash for guest is in /mnt/sdaX/.Trash. and not in /local/share/Trash (pcmanfm) so it can be used both symlink for Desktop (real fs) and move to Trash action.
Last edited by tome on 27 Nov 2013, 04:13, edited 2 times in total.

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: delete as root

Post#13 by phhpro » 26 Nov 2013, 21:27

...
Last edited by phhpro on 03 Feb 2016, 22:06, edited 1 time in total.

tome
Contributor
Contributor
Posts: 577
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: delete as root

Post#14 by tome » 27 Nov 2013, 04:44

I wanted to move files to Trash as guest but in root way. Example:
Desktop is in real fs (link) and I don't use changes so I can not move files to Trash by filemanager command (try if you use non-root account). How to do it (non-ideal solution) is explained in my above last post.

tome
Contributor
Contributor
Posts: 577
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: delete as root

Post#15 by tome » 27 Nov 2013, 18:17

I was wrong and I mixed up. Trash for guest in above (like root) way requires only posix compatibility (no fat or ntfs) and write permissions for partition (/mnt/sdaX) but not permissions for "/" (pcmanfm). :wall:

Post Reply