PDA

View Full Version : Problem whit vsftpd cant chmod files



adapter
13th September 2006, 07:59 AM
Hi,

I have been having some trubble whit vsftpd. When i connect whit filezilla and try to change the chmod on a file/dir nothing happens. Have i got wrong right on /var/www/html folder?
I have not change anyting in vsftpd.conf file

Tanks for the help.

KClaisse
13th September 2006, 08:45 AM
Whith whome are you ftping in as? What user?

If you FTP in as say someboday, but the directory is owned by root, you won't be able to change file attributes.

if you want to be able to ftp and change ANYTHING in /var/www/html then do this



[user@localhost ~]$ su -
Password:
[root@localhost ~]# cd /var/www
[root@localhost www]# chown user html -R

replace user with who ever will be FTPing in (i.e. your ftp user).

Hope that helps. Any questions, feel free to ask.

adapter
13th September 2006, 11:01 AM
Tanks. Im going to test it right now. I think this is going to fix it.. I used hmm chron -R 770 /var/www/html i dont know if it was chron cant find the right output now.

Edit: Worked nice tanks for the help..

KClaisse
13th September 2006, 01:04 PM
No problem

adapter
13th September 2006, 02:47 PM
Hmm I have still got some problmes some dirs cant be removed.. Have to remove them via Terminal. Now I have tested whit both proftd and vsftpd runing whit proftpd atm. I dont know whats wrong.

Logg from ftp client: error 550 dir not emty.

KClaisse
13th September 2006, 03:09 PM
Well thats a protection built into the rmdir command. That way someone doesn't accidently remove a directory with lots of stuff in it. I'm not sure how it would work through ftp, but in the shell, you remove full directories like this


user@localhost ~] rm somedir -R


Make sure you have propper permisions to remove the directory too.

adapter
13th September 2006, 09:26 PM
I think I got it right now I have to use PassivePorts 49152 65534 whit proftpd to get it to work.. ok Maby im lowering the range to 60000-60050 or somthing.. But still I dont get it. Its realy strange.

All this trubbel only for some files/dir cant be removed whit ftp client from windows. If someone can explain whats going on pleas say so :D Is it the router port 20-21,60000-60050 open everyting workes great exept ftp or it works now at the moment going to test it more later.

KClaisse
14th September 2006, 02:41 AM
Oh!
If it's client error it then depends on the client. Some client programs disable removing full directories by default. So you might have to dig around in the prefrences to fix that. I would also keep the stock port of 21.