HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   FTP user with read - write access [HELP] (http://www.howtoforge.com/forums/showthread.php?t=54670)

flynns.br 27th October 2011 15:53

FTP user with read - write access [HELP]
 
Hello guys this is my first post in this forum, and I'm new to ISPconfig, my question is, when I add a ftp-user for my client, they can log in but they can't write the files, they have read-only access to their files, how can I possibly solve this, i try to google it but din't find anything that helped me, so I dicided to post it here.

ps. I installed IPSconfig 3 on a ubuntu 10.04, I've followed the perfect server ispconfig3 at howtoforge,(i cloudn't set quota, could be this?).

till 27th October 2011 16:21

Where do you try to upload files by FTP? Upload is only possible to the "web" directory as this is the directory weher html and php files are stored for the website.

flynns.br 27th October 2011 16:38

Sure, i have already put the files in there with root access, but when i login with the client account i can't write on the directory :confused:

till 27th October 2011 16:45

Quote:

Sure, i have already put the files in there with root access
Ahh, ok, so that the problem. FTP users can not upload or change files when you uploaded them as root user. The root user is the administrative user of a Linux server, files that are uploaded by him vcan not be changed by normal users. To fix this, you have to chown all files and folders recursively to the web user and client group of this website.

Example:

chown -R web1:client1 /var/www/www.domain.tld/web/*

replace web1 with the web user that owns the website and client1 with the group that owns the website. You can find client and group on the options tab of the website settings.

flynns.br 27th October 2011 16:58

Quote:

Originally Posted by till (Post 266105)
Ahh, ok, so that the problem. FTP users can not upload or change files when you uploaded them as root user. The root user is the administrative user of a Linux server, files that are uploaded by him vcan not be changed by normal users. To fix this, you have to chown all files and folders recursively to the web user and client group of this website.

Example:

chown -R web1:client1 /var/www/www.domain.tld/web/*

replace web1 with the web user that owns the website and client1 with the group that owns the website. You can find client and group on the options tab of the website settings.

Thanks man you are a life saver !!!!! it worked like a charme, I just had to change the comand like this:

chown -R web1:client1 /var/www/clients/client1/web1/*

:cool:

till 27th October 2011 17:08

The path /var/www/www.domain.tld/web/ would have worked as well, because /var/www/www.domain.tld/web/ is a symlink to /var/www/clients/client1/web1/. Its just easier to navigate and remember for the admin on the shell :)

flynns.br 27th October 2011 17:15

I got this when I tried like this :

chown: cannot access `/var/www/www.exemplo.com.br/web/*': No such file or directory

till 27th October 2011 17:26

Then the path might be just:

/var/www/exemplo.com.br/web/*

You can see the paths of existing websites by executing:

ls

in the /var/www directory.

flynns.br 27th October 2011 17:37

Sure how stupid I'm, theres no www :o


All times are GMT +2. The time now is 00:24.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.