Current time: 05-16-2024, 03:46 PM Hello There, Guest! (LoginRegister)


Post Reply 
problem with ftp file permissions
Author Message
xtragicerror703 Offline
Newbie
*

Posts: 7
Joined: Jan 2010
Reputation: 0
Post: #1
problem with ftp file permissions
okay so i installed ispcp for the first time and i have a tiny issue. i can't upload via ftp, i can connect but i can't upload. in order for me to upload i have to login to SSH and change all the file permissions within the htdocs folder just to edit them. what can i do please.
01-26-2010 05:31 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: problem with ftp file permissions
My crystal ball is broken, so I can't answer you if you don't provide:

1. "ls -lah /var/www/virtual/domain.tld/htdocs" output
2. FTP error message that you're getting
3. vuXXXX user that should own this website
01-26-2010 05:57 PM
Visit this user's website Find all posts by this user Quote this message in a reply
xtragicerror703 Offline
Newbie
*

Posts: 7
Joined: Jan 2010
Reputation: 0
Post: #3
RE: problem with ftp file permissions
debian:~# ls -lah /var/www/virtual/domain.com/htdocs
total 16K
drwxrwxr-x 3 vu2004 vu2004 4.0K 2010-01-26 02:16 .
drwxrwx--- 9 vu2004 www-data 4.0K 2010-01-26 02:19 ..
drwxr-xr-x 2 root root 4.0K 2010-01-23 14:31 imgs
-rw-r--r-- 1 root root 1.5K 2009-12-09 01:43 index.html

FTP error im getting.
an error occurred while copying a file to the FTP server, Make sure you have permission to put files on the FTP server.
Details:
200 type set to I
227 Entering passive mode (192,168,1,103,131,35)
550 index.html: permission denied.
01-26-2010 06:17 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: problem with ftp file permissions
These files are owned by root, so you obviously get permission denied errors when trying to change them. Run "chown -R vu2004:vu2004 /var/www/virtual/domain.com/htdocs" as root, and you'll be able to correctly handle files through FTP afterwards.

Now, try to create a new website and see if the default files are created as root. If this is the case, you've hit a bug. Otherwise, you changed the permissions somehow and it's your fault.
01-26-2010 08:34 PM
Visit this user's website Find all posts by this user Quote this message in a reply
xtragicerror703 Offline
Newbie
*

Posts: 7
Joined: Jan 2010
Reputation: 0
Post: #5
RE: problem with ftp file permissions
yeah thats true. although when i use that command, i can do anything and everything. but i have to apply that code to each and every domain i create so that i can use ftp. but thank you for that command.
01-28-2010 12:40 AM
Find all posts by this user Quote this message in a reply
alpracka Offline
Newbie
*

Posts: 7
Joined: Jan 2011
Reputation: 0
Post: #6
RE: problem with ftp file permissions
Hallo,

thanks for this thread, it solved my problem in part. But..

I'm using one SSH account for access on server - the root user. I'm editing all the virtuals I need etc. But when i change someting in virtuals htdocs, the rights changes to "root" insted of "vu2033" eg. It causes problems like described above and I have to manually change the rights, if other users are accessing via FTP of "vu2033" account.

So I wanna ask, Is there a option how to "fix" this? I dont want access on server via unsecured FTP.


Thanks for help!
06-02-2011 05:31 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #7
RE: problem with ftp file permissions
Give the normal users (vuXXXX) a password and connect through them instead of connecting through the root user.
06-02-2011 03:23 PM
Visit this user's website Find all posts by this user Quote this message in a reply
alpracka Offline
Newbie
*

Posts: 7
Joined: Jan 2011
Reputation: 0
Post: #8
RE: problem with ftp file permissions
I tried:

passwd vu2033 //and i have set password
chown vu2033:vu2033 /var/www/virtual/hisdomain.com

If I try connect via SSH on vu2033 user, the server interrupts the connection gracefully immediately after login Sad. If I try create new user normally, SSH connection works.

Anything wrong? Thanks for help.
06-03-2011 01:26 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #9
RE: problem with ftp file permissions
(06-03-2011 01:26 AM)alpracka Wrote:  If I try connect via SSH on vu2033 user, the server interrupts the connection gracefully immediately after login Sad. If I try create new user normally, SSH connection works.

Anything wrong?

You also have to change the user's shell (edit the /etc/passwd file directly).
06-03-2011 12:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)