[Mono-dev] FileSecurity or chmod

markohrastovec marko.hrastovec at gmail.com
Fri May 8 03:17:02 EDT 2009


I have written a windows service because I had to do it for Windows. Now I
got the chance to move it Linux and Service works fine with very only one
minor change I had to do. It is still full compatible with windows and it
works in both operating system.

However I have found one issue I don't know how to resolve. I am using class
Bitmap and its method Save. This method saves file with access mask 600.
That means only the owner of the file can read the file. Thet is not OK
because I want the files created by the serivce accessible via ftp. I have
tried with umask settings for the service but it doesn't seem to help.
Another solution would be to set up permissions right after the file is

Is it possible to set permissions for the file with FileSecurity class? If
yes. How? I will probably use for start system call to chmod
(Mono.Unix.Native.Syscall.chmod) but I do not prefer this solution because I
lose binary compatibility with windows.

View this message in context: http://www.nabble.com/FileSecurity-or-chmod-tp23440576p23440576.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

More information about the Mono-devel-list mailing list