Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Having problems with file permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
AMABITxS
n00b
n00b


Joined: 12 Aug 2004
Posts: 24
Location: Goldsboro, NC

PostPosted: Fri Jul 11, 2008 10:36 pm    Post subject: Having problems with file permissions Reply with quote

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
View user's profile Send private message
Kathars!s
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2004
Posts: 78

PostPosted: Sat Jul 12, 2008 8:41 am    Post subject: Reply with quote

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
View user's profile Send private message
AMABITxS
n00b
n00b


Joined: 12 Aug 2004
Posts: 24
Location: Goldsboro, NC

PostPosted: Sat Jul 12, 2008 10:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum