* Problem: DOSEMU ignores Linux user file access settings
@ 2004-01-19 12:16 Mgr. Peter Tuharsky
2004-01-19 12:33 ` Bartos-Elekes Zsolt
2004-01-19 13:35 ` Bart Oldeman
0 siblings, 2 replies; 4+ messages in thread
From: Mgr. Peter Tuharsky @ 2004-01-19 12:16 UTC (permalink / raw)
To: linux-msdos
Hallo!
I have big problem with file access privilegues. I don't know how to
solve it. Or how to force DOSEMU to respect Linux file access settings?
DOSEMU uses one strict policy when creating new file from inside
emulated environment: It creates new file with 600 attrib mask and
user-only gid/uid. DOSEMU fully IGNORES both bash.profile setting, and
folder's SetUid/SetGid setting!! And this is the reason of my big problem.
I have DOSEMU 1.2rc1 installed on the one machine (server) and
second computer is connected as thin client, so the DOSEMU runs only
locally on the server, on local drive, local directory on Linux
filesystem to avoid any network-drive related problems (elegant
solution, there isn't difference between "tru local" and "remote X"
session -both are in fact local on server).
I need two users to run simultaneously one copy of Clipper database
program. If I manually add both users to the same workgroup (name it
'ambul') and set group attribute of the files and folders they should
have access, and set correct attributes (770), the program runs smoothly
(expecting the sometimes slow feeling because of that stupid "what's the
time?" loop typical for Clipper). As long as they work with only
existing files with correct attributes set, it works perfectly.
But once the program creates new file under one user's session (what
sometimes happens during some actions such as print or so), the program
in second user's session claims error opening the file and crashes. The
same when reindexing the database (it creates new .ntx files with the
crippled privilegues too). It dosen't matter, which one is the "first"
user. The program under the first session creates a new file and DOSEMU
gives the file 600 (rw user-only) permissions, no matter that
bash.profile says that user's new files must be created with 770 mask
(rwxrwx---), and the folder has SetGid attribute set, so that all
created files should have Group attribute set to the same value as the
parent directory has.
My first approach was to search for some setting in .dosemurc to do
this, but I cannot find such setting that would force DOSEMU to respect
Linux file access rights management when creating new file.
Thent I thought that logging the both sessions under the same
username could solve the problem. Not good solution, but better than
nothing. This cannot work, however. Both users want to print to their
printers, and the printers are defined thru .dosemurc files in their
home directories. Once I run both users under the same login name, they
both use the same .dosemurc settings file and thus BOTH PRINT ON THE
SAME NETWORK PRINTER! Running one of DOSEMU session from other home
directory dosen't help either, because DOSEMU takes .dosemurc strictly
from user's home directory and this way the printing is directed to only
one printer.
Please hlep. How to force DOSEMU to respect Linux file access
management?
Sincerely
Peter
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Problem: DOSEMU ignores Linux user file access settings
2004-01-19 12:16 Problem: DOSEMU ignores Linux user file access settings Mgr. Peter Tuharsky
@ 2004-01-19 12:33 ` Bartos-Elekes Zsolt
2004-01-19 13:35 ` Bart Oldeman
1 sibling, 0 replies; 4+ messages in thread
From: Bartos-Elekes Zsolt @ 2004-01-19 12:33 UTC (permalink / raw)
To: linux-msdos
> Both users want to print to their
> printers, and the printers are defined thru .dosemurc files in their
> home directories. Once I run both users under the same login name, they
> both use the same .dosemurc settings file and thus BOTH PRINT ON THE
> SAME NETWORK PRINTER! Running one of DOSEMU session from other home
> directory dosen't help either, because DOSEMU takes .dosemurc strictly
> from user's home directory and this way the printing is directed to only
> one printer.
See the -f parameter for dosemu.bin to use a different .dosemurc, and start
each dosemu client with a different .dosemurc, which contains only a line like
$_printer = "rlp_1"
Sincerely,
Zsolt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem: DOSEMU ignores Linux user file access settings
2004-01-19 12:16 Problem: DOSEMU ignores Linux user file access settings Mgr. Peter Tuharsky
2004-01-19 12:33 ` Bartos-Elekes Zsolt
@ 2004-01-19 13:35 ` Bart Oldeman
2004-01-21 12:18 ` Problem: DOSEMU ignores Linux user file access settings -solved Mgr. Peter Tuharsky
1 sibling, 1 reply; 4+ messages in thread
From: Bart Oldeman @ 2004-01-19 13:35 UTC (permalink / raw)
To: Mgr. Peter Tuharsky; +Cc: linux-msdos
On Mon, 19 Jan 2004, Mgr. Peter Tuharsky wrote:
> DOSEMU uses one strict policy when creating new file from inside
> emulated environment: It creates new file with 600 attrib mask and
> user-only gid/uid. DOSEMU fully IGNORES both bash.profile setting, and
> folder's SetUid/SetGid setting!! And this is the reason of my big problem.
no, DOSEMU doesn't ignore them. Be careful here. What is your umask
setting from bash.profile? Try a simple
umask
to be sure about that (in Linux)
If it's 007 then new DOSEMU files (with archive bit set) are
normally created as
-rw-rw----
Also DOSEMU doesn't do chown on files so I can't see how it could ignore
setgid attributes on directories -- the files will have the same
owner/group as a simple file created with
echo hello > file
would do. Try this command in Linux *and* in DOSEMU in the same
directory and look at the permissions.
> directory dosen't help either, because DOSEMU takes .dosemurc strictly
> from user's home directory and this way the printing is directed to only
> one printer.
Try -f. Also the environment variable dosemu__printer can do the trick as
long as you do *not* define it in .dosemurc.
Bart
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem: DOSEMU ignores Linux user file access settings -solved
2004-01-19 13:35 ` Bart Oldeman
@ 2004-01-21 12:18 ` Mgr. Peter Tuharsky
0 siblings, 0 replies; 4+ messages in thread
From: Mgr. Peter Tuharsky @ 2004-01-21 12:18 UTC (permalink / raw)
To: Bart Oldeman, linux-msdos
Thank You very much.
I tested the way You suggested and I figured out that fault was mine.
Maybe it was matter of too much stress :o)
The bash.profile umask was set ok, but when I ran DOSEMU directly from X
and not from terminal, the bash.profile was of course not interpreted.
Solution was quite simple -add umask command to dosemu start script.
Your help was valuable cause I was able to find and solve problem thanks
to Your advice.
Thanks to You all that answered my question. Also thanks to DOSEMU team
for their great work!
Sincerely Peter
Bart Oldeman wrote:
>On Mon, 19 Jan 2004, Mgr. Peter Tuharsky wrote:
>
>
>
>> DOSEMU uses one strict policy when creating new file from inside
>>emulated environment: It creates new file with 600 attrib mask and
>>user-only gid/uid. DOSEMU fully IGNORES both bash.profile setting, and
>>folder's SetUid/SetGid setting!! And this is the reason of my big problem.
>>
>>
>
>no, DOSEMU doesn't ignore them. Be careful here. What is your umask
>setting from bash.profile? Try a simple
>umask
>to be sure about that (in Linux)
>
>If it's 007 then new DOSEMU files (with archive bit set) are
>normally created as
>-rw-rw----
>
>Also DOSEMU doesn't do chown on files so I can't see how it could ignore
>setgid attributes on directories -- the files will have the same
>owner/group as a simple file created with
>echo hello > file
>would do. Try this command in Linux *and* in DOSEMU in the same
>directory and look at the permissions.
>
>
>
>>directory dosen't help either, because DOSEMU takes .dosemurc strictly
>>from user's home directory and this way the printing is directed to only
>>one printer.
>>
>>
>
>Try -f. Also the environment variable dosemu__printer can do the trick as
>long as you do *not* define it in .dosemurc.
>
>Bart
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-21 12:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-19 12:16 Problem: DOSEMU ignores Linux user file access settings Mgr. Peter Tuharsky
2004-01-19 12:33 ` Bartos-Elekes Zsolt
2004-01-19 13:35 ` Bart Oldeman
2004-01-21 12:18 ` Problem: DOSEMU ignores Linux user file access settings -solved Mgr. Peter Tuharsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox