View previous topic :: View next topic |
Author |
Message |
AMABITxS n00b
Joined: 12 Aug 2004 Posts: 24 Location: Goldsboro, NC
|
Posted: Fri Jul 11, 2008 10:36 pm Post subject: Having problems with file permissions |
|
|
Hi, I have set up pure-ftpd using unix authentication. Then I set up a user that I wanted to be able to ftp to my web folder (/var/www/localhost/htdocs).
I am able to open files on my ftp client, but I cannot save them. If I use my root account then I can save the file just fine which makes me thing that it is a file permission problem. And since I don't want to use my root account all the time, I'd really like to get it working.
The user is named: 'editplus' who is a member of the group apache
Code: | editplus@Mars ~/localhost/htdocs $ groups
apache users ftpgroup
|
And the apache group has read/write privileges on the file:
Code: | editplus@Mars ~/localhost/htdocs $ ls -l
total 32
-rw-r--r-- 1 apache apache 2326 Jun 29 13:18 apache_pb.gif
-rw-r--r-- 1 apache apache 1385 Jun 29 13:18 apache_pb.png
-rw-r--r-- 1 apache apache 2410 Jun 29 13:18 apache_pb22.gif
-rw-r--r-- 1 apache apache 1502 Jun 29 13:18 apache_pb22.png
-rw-r--r-- 1 apache apache 2205 Jun 29 13:18 apache_pb22_ani.gif
-rw-r--r-- 1 apache apache 2 Jul 10 19:44 favicon.ico
-rw-rw-r-x 1 apache apache 345 Jul 11 11:55 index.php
drwxr-xr-x 11 apache apache 4096 Jul 9 22:04 phpmyadmin
|
There is an error reported in '/var/log/messages' when I try to save the file via ftp:
Code: | Jul 11 16:33:50 Mars pure-ftpd: (editplus@192.168.1.110) [ERROR] Rename/move failure: Permission denied
|
I've tried setting the permissions on index.php to '777' and got the same error. So I don't know what the problem is...
Any Ideas why it won't work... |
|
Back to top |
|
|
Kathars!s Tux's lil' helper
Joined: 29 Sep 2004 Posts: 78
|
Posted: Sat Jul 12, 2008 8:41 am Post subject: |
|
|
this could be related to the directory file permissions, check them like the following and notice the default value below.
Code: | $ ls -ld /var/www/localhost/htdocs/
drwxr-xr-x 2 root root 133 7. Jul 23:31 /var/www/localhost/htdocs/ |
maybe the file is uploaded with a temporary name first and then moved over the original file. |
|
Back to top |
|
|
AMABITxS n00b
Joined: 12 Aug 2004 Posts: 24 Location: Goldsboro, NC
|
Posted: Sat Jul 12, 2008 10:39 pm Post subject: |
|
|
well... the directory did belong to another user so I changed it but I still get a permission denied when I try to upload the files from my ftp server.
This is what it looks like now:
Code: | $ ls -ld /var/www/localhost/htdocs/
drwxrwxr-x 4 apache apache 4096 Jul 12 16:30 /var/www/localhost/htdocs/
|
I added the write permissions for the group hoping that would fix the problem.
Maybe there is a temp file like you suggested, but just in another location.... I'll look into that.
Thanks for the suggestion!!! |
|
Back to top |
|
|
|