Zentyal Forum, Linux Small Business Server
Zentyal Server => Installation and Upgrades => Topic started by: akhasis on December 08, 2012, 12:18:36 pm
-
Hello,
I want to grant user A no access to FTP, user B should be able to access her home directory, and user C should be able to access his home and the www directory.
As far as I know, vsftp, the ftp server used by zentyal, allows that configuration by indicating in its config file a directory where the user custom configurations are stored. But any change I make to vsftp config file is overwritten by zentyal, much like happens to th changes made to its web server configuration file.
I know that, in the web server, changes can be made that will not be overwritten: a file can be created at /etc/apache2/sites-available/user-ebox-[domain] . Is there anything like that for vsftp? Or any other way to be able to configure FTP access for each user?
Thank you!
-
You need to edit the .mas file in /usr/share/zentyal/[zentyal-module-name] (Check the naming structure)
I also want to access /var/www and /srv/www.
I have tried and the settings to limit the user or change settings doesn't seem to work for me though.
-
Hello akhasis,
> and user C should be able to access his home and the www directory
You'll have to:
1) install suPHP
2) copy&mod the zentyal configuration file (as explained lower and in the previous reply)
2a) comment the web root folder from the main conf file (e.g. #DocumentRoot <% $docRoot %>/<% $vHostName %>)
2b) create a custom vhost file with the new http root
e.g.
echo "DocumentRoot /home/<user>/public_html/" > /etc/apache2/sites-available/user-ebox-[domain]/www-root
** While beeing there - you may also want to change the following to the main "vhost.mas" file:
Webmaster email (not sure why it's not already this way):
ServerAdmin webmaster@<% $hostname %>
to
ServerAdmin webmaster@<% $vHostname %>
Error log:
Comment the Errorlog line:
#ErrorLog /var/log/apache2/<% $vHostName %>-error.log
and making a new custom entry for each webmaster:
sudo mkdir /home/<user>/logs && chown user:user /home/<user>/logs
echo "ErrorLog /home/<user>/logs/<% $vHostName %>-error.log" > /etc/apache2/sites-available/user-ebox-[domain]/ErrorLog"
Custom log:
Comment the CustomLog line:
#CustomLog /var/log/apache2/<% $vHostName %>-access.log combined
and making it available for each webmaster:
echo "ErrorLog /home/<user>/logs/<% $vHostName %>-error.log" > /etc/apache2/sites-available/user-ebox-[domain]/CustomLog"
> any change I make to vsftp config file is overwritten by zentyal
You must:
a) copy the original "
e.g.
cp /usr/share/zentyal/stubs/<modulename>/<filename>.mas" files to "/etc/zentyal/stubs/<module name>/<filename>.mas
b) make your mods in the new files
c) restart the service
e.g.
sudo /etc/init.d/zentyal <service>
I'm not sure about all the rest...
Best,
Marcus
-
I am the same Marcus why hostname is used instead vhostname.
Also you might want to add a server alias ServerAlias www.<% vhostname %>
I always find in confusing with the default website being in /var/www and virtual-hosts in /srv/www
This is due to Zarafa where I like to lock access to a particular domain.
-
Thank you stuartiannaylor/Marcus. I'll let you know when I try what you suggested.
-
Thank you, it worked