Page 1 of 1

File permissions issue in Linux

Posted: Mon 02 Jan 2023 11:37 am
by broadstairs
I am trying to run WXSim under Wine on Linux as well as CMX under Mono. At the start of each month a new monthly log file is created by CMX as root with permissions of 740 but when WXSim uses WXSimate to open and read the new monthly log file it fails and gets no local data. Now as far as I am aware WXSimate only asks for read access (remember this is running under Wine) however if I alter the permissions to 770 it works and can read the file. I suspect this is a problem with Wine however there is no Linux version of WXSim to run natively on Linux. I don't believe there a risk if CMX changes the file permissions to 770 on its log files? Can this be considered? It will be an issue for anyone wishing to run WXSim under Wine.

Please don't suggest I run under Windows - that is NOT an option.

Stuart

Re: File permissions issue in Linux

Posted: Mon 02 Jan 2023 12:17 pm
by freddie
Looks like Wxsim is asking to open the file as read/write rather than read only. You should be able to specify perms as 660 - unless Wine requires the execute bit be set for writing.

Re: File permissions issue in Linux

Posted: Mon 02 Jan 2023 12:19 pm
by broadstairs
Well I was running mono as root, I have no idea why but anyway I thought I'd try to run it as my normal user and yes it does run just fine. So that will sort my file permissions issue hopefully, I'll have to wait and see what happens when WXSim next runs its data collection!

Stuart

Re: File permissions issue in Linux

Posted: Mon 02 Jan 2023 12:22 pm
by freddie
At the start of each month a new monthly log file is created by CMX as root with permissions of 740
This points to a mask problem in your Linux install. The OS will use the mask setting to set initial permissions on a file created by CMX. On my system the mask is 644, but it does vary between distros. However I've never encountered a distro that uses a 7 in its default mask setting

Re: File permissions issue in Linux

Posted: Mon 02 Jan 2023 12:35 pm
by broadstairs
The umask command returns 0022 on my systems which I gather is the usual value.

Stuart