From: Jamie C. <jca...@we...> - 2009-12-29 06:29:34
|
You could make this chown conditional on whether the domain is sub-server or not, with shell code like : if [ "$VIRTUALSERVER_PARENT" = "" ]; then chown root $VIRTUALSERVER_HOME fi The VIRTUALSERVER_PARENT variable is set to the ID of the parent server, and is empty for top-level servers. - Jamie On 28/Dec/2009 21:44 steve <st...@gr...> wrote .. > OK, I've got that working by adding the directory to /etc/skel, and that > seems ok. However, the actions I've got set up to chown $HOME to root on > user creation (/bin/chown root $VIRTUALSERVER_HOME ) is also run for the > subserver, which screws up the ownership of ~/domain. > > Can you suggest a way around this? It would be really great if > virtualmin supported chrooted sftp access out of the box, and I think > this is the last hurdle... > > Cheers, > > Steve > > On Sat, 2009-12-26 at 22:00 -0800, Jamie Cameron wrote: > > On 26/Dec/2009 18:07 steve <st...@gr...> wrote .. > > > Hi All, > > > > > > I've got a bit of a non-standard template I use so that sftp is > > > available to all users of a domain. To do this, I need to change > > > ownership/access to the root directory to 755, owned by root, or else > > > sftp access fails. > > > > > > When I attempt to create a subdomain, the process doesn't have the > > > privilege to create the ~/domain directory, and the subdomain isn't > > > created correctly. > > > > > > Is there a simple fix for this? > > > > Perhaps have your script pre-create the ~/domains sub-directory with > > the correct ownership, after chowning the root directory ? > > > > - Jamie > > > > ------------------------------------------------------------------------------ > > This SF.Net email is sponsored by the Verizon Developer Community > > Take advantage of Verizon's best-in-class app development support > > A streamlined, 14 day to market process makes app distribution fast and easy > > Join now and get one step closer to millions of Verizon customers > > http://p.sf.net/sfu/verizon-dev2dev > > - > > Forwarded by the Webmin mailing list at web...@li... > > To remove yourself from this list, go to > > http://lists.sourceforge.net/lists/listinfo/webadmin-list > -- > Steve Holdoway <st...@gr...> > http://www.greengecko.co.nz > MSN: st...@gr... > GPG Fingerprint = B337 828D 03E1 4F11 CB90 853C C8AB AF04 EF68 52E0 |