PDA

View Full Version : file dir ownership and permissions


carpman
July 10th, 2009, 12:02 PM
Hello, i am running this on test to see what it is like and created test website, i noticed that i have logged in as root to unzip files as the webftp baulked on this.

So file and dir with root ownership is not good so what to set them as?

Have tried vsftpd www-data which is what parent dir is.

I added my user to group www-data and then tried setting file permission to allow writing of from group so i could use sftp.

Thing now site is not accessible at all :(

So who should own dir and files?

should it be the account under which domain was created?

cheers

bvidinli
July 11th, 2009, 05:08 PM
all user/domain files should be owned by vsftpd,
this is ftp user, and you need this access to use it by means of ftp.

let me know if it is okey.

carpman
July 15th, 2009, 06:15 AM
all user/domain files should be owned by vsftpd,
this is ftp user, and you need this access to use it by means of ftp.

let me know if it is okey.


Cheers, just wondering how this would work with sftp via konqueror?

bvidinli
July 15th, 2009, 04:17 PM
For changing file ownership, you need to login to server using ssh.
ssh to console, than change file ownership using:
chown -Rvf vsftpd yourdirname

then,
you may use all your files with any ftp client.

i am not sure about konqueror. with som browsers, such as konqueror or gnome file browser, it may be like ftp://user@server, i am not sure.

i suggest to use an ftp client to access files directly, such as filezilla

carpman
July 15th, 2009, 06:53 PM
Ok i will try that, sftp is secure and by konqueror i mean konqueror in file management mode not browser so files appears as they would in file manager.