one thing I am experiencing that I find frustrating is that if I log into a virtual server as the original server admin account it automatically assigns ownership for anything I add in the pub_html directory to root:root.
why can’t it be smart enough to realise that the virtual server has its own automatically generated admin account and instead assign the correct ownership according to each virtual servers own user and domain?
For example, if I created a new virtual server called “bob” and virtualmin virtual server admin user called “bob”, then shouldn’t this be the user that this virtual server assigns ownership of new files copied into the public_html directory by default if done by ra higher level administrator such as root?
so ownership would be bob:bob and not root:root
Have I done something wrong in my original webmin/virtualmin install to cause this problem? If so, how do I fix it?
You can upload anything as root, but once done select newly uploaded files and change the ownership. Other solution is to log as VS owner and then upload the files. Either way everything works as supposed.
so this is a linux thing?
The problem with loggin in as the server admin, if the defaults assigned to that administrator are somewhat restricted, then the higher admin has to be used anyway. I just thought that perhaps virtualmin developers could create a check box on the file manager for importing files where the highest level administrator could automatically have virtualmin assign the correct ownership to overcome this.
The File Manager should be creating files as the domain owner user, when you get there through the file manager link within the domain section of the menu (currently labeled “Files and Directories”, but that’s changing to just “File Manaer” soon, as it doesn’t make sense for it to have two different labels in the menu depending on where you are).
But, that option doesn’t seem to be working right. Not sure if that’s a regression or an old bug that nobody has noticed. I’ll ask Ilia and/or Jamie depending on who’s code it involves.
Joe, the file manager do create/edit/extract files as the domain owner.
The File Manager has a option in its configuration,
Automatically switch to user mode upon entering its home directory, If “Yes” is checked then the owner become the domain owner, for example mydomain:mydomain on file creation, editing and extracting. You can go from Webmin/Others/File manager or from Virtualmin/Domain.tld/Files and Directories they are working in the same same way.
Oh… forgot to mention that the configuration option only exists when using Authentic Theme. In Virtualmin Framed Theme the File manager creates new files as the domain owner without the configuration option.
Thanks for the clarification, Leffe! You’re right. I poked at this for a few minutes, and it does seem to be working right in Authentic theme…looking at the code, I could maybe see how it could fail if the user is not root, but has been granted access to Virtualmin. I’m not sure when the is_root function returns true, which is what decides whether files get ownership changed.
The fact that it doesn’t work in older themes is bug-like. Ilia tends to do things in the theme because he owns it, but some things ought to bubble into core Webmin.