Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Technical issues/questions of an intermediate or advanced nature.

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Yes, because at least the system doesn't get broken.
4
50%
No, because no one should use rootcopy in a non-POSIX file system.
2
25%
I don't care or I don't understand the relevance of this.
2
25%
 
Total votes: 8

fulalas
DEV Team
DEV Team
Posts: 1605
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#16 by fulalas » 20 Aug 2020, 06:42

@ncm, @roadie and @babam, the thing is: Porteus already provides support for non-POSIX rootcopy. If we start to require a cheatcode in order to make it work, it will break Porteus for many people, including for sure me and some friends of mine.
roadie wrote:
20 Aug 2020, 04:15
I'm currently fighting whatever is changing attributes on my latest shiny thing. I'd much rather have choice, than something just being done and that's the way it is.
What I'm proposing won't change anything in your system because you use a POSIX file system. You see? :)
babam wrote:
20 Aug 2020, 06:23
Should not use Rootcopy on non-POSIX filesystem.
Why? I have been using this since forever and It has been working just nice. The only moment I had an issue (and it was not critical) was a few months ago and the fix is pretty easy -- the very reason I created this topic. Me and a friend of mine are already using Porteus with this change and it has been working flawlessly.

Freedom, people! :thumbsup:

User avatar
babam
Samurai
Samurai
Posts: 138
Joined: 16 Nov 2016, 10:30
Distribution: Porteus Xfce 3.2.2
Location: Rainy city

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#17 by babam » 20 Aug 2020, 06:51

The reason is simple, because non- POSIX filesystem do not support permissions and ownership.
Sorry, my English is bad.

fulalas
DEV Team
DEV Team
Posts: 1605
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#18 by fulalas » 20 Aug 2020, 06:58

And...? Give me one real (not theoretical) example of something critical that may happen to the point the user will get lost.

User avatar
babam
Samurai
Samurai
Posts: 138
Joined: 16 Nov 2016, 10:30
Distribution: Porteus Xfce 3.2.2
Location: Rainy city

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#19 by babam » 20 Aug 2020, 07:07

Inside the rootcopy folder contains etc/sudoers and then you can't use sudo
Sorry, my English is bad.

Kulle
Shogun
Shogun
Posts: 250
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#20 by Kulle » 20 Aug 2020, 15:04

Hi ncmprhnsbl,

I'm using Porteus 4.0 on a USB stick, fat32.
I am using rootcopy. It is very useful.
But problems never occurred!

"nonPOSIX rootcopy disabled by default ie. just won't work at all"
I wouldn't like that!

Alternative to rootcopy:
A simple script (some cp commands).
This script should be started automatically (After all modules are loaded)
How can this be done?
Where does the script have to be saved?

User avatar
Ed_P
Contributor
Contributor
Posts: 5796
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 & 5.0rc2 Cinnamon 64 ISOs
Location: Western NY, USA

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#21 by Ed_P » 20 Aug 2020, 17:43

Kulle wrote:
20 Aug 2020, 15:04
Alternative to rootcopy:
A simple script (some cp commands).
This script should be started automatically (After all modules are loaded)
How can this be done?
Where does the script have to be saved?
I have scripts like that, one for touchpad tweaks for example. I save the scripts in my /home/guest folder and add desktop files for each to /etc/xdg/autostart/ to run them. Both the scripts and the desktop files are set to be executable with chmod +x commands.
Ed

Kulle
Shogun
Shogun
Posts: 250
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#22 by Kulle » 20 Aug 2020, 18:31

Hi Ed_P,
many thanks for the help.
So I still have to learn how to create desktop files.
I'm gradually becoming a professional.
The help in this forum is fantastic.

User avatar
Ed_P
Contributor
Contributor
Posts: 5796
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 & 5.0rc2 Cinnamon 64 ISOs
Location: Western NY, USA

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#23 by Ed_P » 20 Aug 2020, 20:13

All I did was copy an existing desktop file, /home/guest/Desktop/.....desktop, and modified it to meet my needs.

/etc/xdg/autostart/touchpad.desktop

Code: Select all

[Desktop Entry]
Name=Touchpad
Exec=sh /home/guest/touchpad.sh
Icon=/usr/share/pixmaps/porteus/tools.png
Terminal=false
Type=Application
Name[en_US]=Touchpad
StartupNotify=false
Ed

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 2708
Joined: 20 Mar 2012, 03:42
Distribution: 5.0rc1-64bit all-DE+more
Location: australia
Contact:

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#24 by ncmprhnsbl » 21 Aug 2020, 02:20

fulalas wrote:
20 Aug 2020, 06:42
the thing is: Porteus already provides support for non-POSIX rootcopy
not actively preventing does not equal support.
from: http://www.porteus.org/faq.html#twenty3
I'm using /porteus/rootcopy for adding files to the live filesystem and all of the permissions are messed up.

When the /porteus/rootcopy folder is placed on a FAT/NTFS filesystem, all files are given 777 permissions due to Windows filesystem limitations. When Porteus is booted over a network (PXE) then all files from /porteus/rootcopy are given 444 permissions (that's how http service works). If you want to keep your original permissions then you must use an xzm module and not /rootcopy.
even what you're proposing(ie. mitigating the most obvious bad effect) doesn't really equal 'support' either.
fulalas wrote:
20 Aug 2020, 06:42
If we start to require a cheatcode in order to make it work, it will break Porteus for many people,
"break Porteus" ... hardly ...using a cheatcode to enable a dubious practice is not a great imposition.. if you're going to the trouble of putting stuff in rootcopy, editing porteus.cfg isn't exactly a difficult step. and it's definately not restricting anyone's freedom.. :D

the other thing about this is: nobody needs to use rootcopy..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

fulalas
DEV Team
DEV Team
Posts: 1605
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#25 by fulalas » 21 Aug 2020, 03:27

ncmprhnsbl wrote:
21 Aug 2020, 02:20
not actively preventing does not equal support.
[...]
even what you're proposing(ie. mitigating the most obvious bad effect) doesn't really equal 'support' either.
Having support to is different from having support of, right? Porteus clearly provides support to non-POSIX rootcopy simply because the feature is there.

To most people, having their config files in rootcopy (mostly common scenario) doesn't mean they are breaking anything. As I said, I've been using this (and it's not limited to me, of course) for years and the only moment something went wrong was because Porteus was doing something wrong that can be easilly fixed.
ncmprhnsbl wrote:
21 Aug 2020, 02:20
"break Porteus" ... hardly ...using a cheatcode to enable a dubious practice is not a great imposition.. if you're going to the trouble of putting stuff in rootcopy, editing porteus.cfg isn't exactly a difficult step. and it's definately not restricting anyone's freedom.. :D
If you remove a feature or create new rules to use it, yes, you're increasing the chances of people having their system broken -- and the possibilities here are endless. Putting stuff in rootcopy can be used by both rookie and advanced users, but understanding what's really happening under the hood is another story. Expecting that everybody should know it is asking too much, don't you think? To be honest, I've been using Linux for 4 years now, and I wasn't aware of what's happening regarding rootcopy and non-POSIX file systems until 6 months ago. And it's not like I'm a rookie user. It's just that there's so much to learn!

I understand that our mission as developers is to provide the easiest and more flexible and robust system possible. Users just need to use it, not to deeply understand it. Linux having such a small percentage of OS users is due mostly to the fact that Linux developers think everybody should be as geek as they are. Take LXQt, for example, that by default provides file search with regex and case sensitive ON. This is not understanding that we developers are not a good representation of the average user.
ncmprhnsbl wrote:
21 Aug 2020, 02:20
the other thing about this is: nobody needs to use rootcopy..
One could argue that nobody needs Porteus in the first place. Or even a computer. Or even digital technology. After all humanity lived without it for so long... This is all very fragile, of course. Users needs are relative to their wishes and possibilities. It's not up to us to judge them. As someone said in this topic, rootcopy is one of the most interesting Porteus features. Imposing rules for using it would be even worse than not including the fix I'm proposing in this topic.

roadie
Full of knowledge
Full of knowledge
Posts: 270
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#26 by roadie » 21 Aug 2020, 16:29

As I see it, linuxrc currently detects a non-POSIX filesystem, and as I recall, asks if the user wants to save changes. Therefore, can it not just be added that if a non-POSIX is detected, and "norootcopy" is not detected on the cmdline, then it copies rootcopy while preserving permissions?

I don't see why that would cause issues, and as I mentioned, I have never thought about using rootcopy on a non-POSIX, I never see it talked about. As it is now, things are happening that shouldn't happen when it's used on a non-POSIX, and that's bothersome..........kinda like the "bug" where a .cache directory is placed on /......doesn't do any harm, but it's somewhat irritating because it shouldn't be there. The hunt continues on that front.

ncmprhnsbl wrote:
21 Aug 2020, 02:20
the other thing about this is: nobody needs to use rootcopy..

The first thing that flashed in my mind was the song...."Mama Don't Take My Kodachrome Away"

donald
Full of knowledge
Full of knowledge
Posts: 1699
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Should Porteus prevent system permission changes when rootcopy is stored in non-POSIX file system?

Post#27 by donald » 21 Aug 2020, 21:47

When the /porteus/rootcopy folder is placed on a FAT/NTFS filesystem,
all files are given 777 permissions
With 777 permissions, you are giving anyone full access to the files or directories with those permissions.
They may alter them in any way they choose, including maliciously.
To allow rootcopy on a non-POSIX fs is simply wrong.
Full Stop, End of Story.

If it is allowed anyway, the user has to be warned about the consequences
[Do it at your own risk and don't bother us if something went wrong]
and he/she has to switch it on willingly.[cheat-code]

Post Reply