OS/2, eCS & ArcaOS - Technical > Applications

SeaMonkey downloads and Unix permissions

<< < (2/7) > >>

David McKenna:
 Well... not quite. I went to the server and checked the permissions on the file I copied, and they are still -rw-------. So that means only someone logged on as root can get to them (and show then as -rw-rw-rw-). I'll try Dave's approach next...


David McKenna:
 Chowning the SeaMonkey executable didn't help - it still saves files as '-rw------- root root'. When I think about it, probably by design the only way to deal with this is chmod the files to give them universal access. Too bad can't get SeaMonkey to do it when downloading...


Dave Yeo:
I can't imagine how SeaMonkey could change the ownership when downloading besides changing its owner, too bad su is broken.
Simplest may be to just change the ownership of the downloaded files, something like

--- Code: ---chown -cR dave Downloads/
--- End code ---
executed in the parent of Downloads/ gives this,

--- Code: ---Z:\Mozprofiles\Downloads>ls -l to*
-rwxr-xr-x 1 dave root 90333 Feb  2  2021 tolower_ld.exe
-rw------- 1 dave root  3695 Feb  2  2021 tolower.c
-rw------- 1 dave root   696 Feb  2  2021 tolower.mak
-rw------- 1 dave root  3695 Feb  2  2021 toupper.c
-rwxr-xr-x 1 dave root 90333 Feb  2  2021 toupper.exe
-rwxrwxrwx 1 dave root  6228 Feb  2  2021 TOLOWER.EXE

--- End code ---

Dave Yeo:
OK, thinking about it some more, SeaMonkey (and FF and TB) is broken when setting the permissions as the downloaded files should be at least readable by all users or better, use the umask of the parent directory. Seems we don't have the umask command and setting the parent directories permissions to, for example 777 doesn't help.
I found https://bugzilla.mozilla.org/show_bug.cgi?id=120679 which should have at least changed OS/2's directory file permissions to 0777 instead of 0644 but didn't seem to have been applied to nsLocalFileOS2.cpp. I can change that easy enough. The other problem is that for files it has this comment,

--- Code: ---// the only Unix-style permission OS/2 knows is whether a file i
// writable;  as a matter of policy, a browser shouldn't be able
// to change any of the other DOS-style attributes;  to enforce
// this, we use DosSetPathInfo() rather than chmod()

--- End code ---

I can probably fix this too by borrowing the Unix code. Have to think on it. it'll also require rebuilding everything once working.
To be considered, what permissions should files have and should tmp files be treated differently? On Unix, files stored in /tmp might have sensitive info, lets say a personalized PDF, so is stored only readable by the owner. Does this matter on OS/2? Seems to me not so perhaps best to just set all permissions as readable/writeable and executable by everyone?

David McKenna:

  I would think at least readable and writable by everyone, and executable too if an executable file, but I am no expert on this for sure.. thanks for even considering fixing this!



[0] Message Index

[#] Next page

[*] Previous page

Go to full version