How to set the same permision of Apache with file/folder of Proftpd?

I use proftpd to get upload-file of user. Each user have a folder to upload.
I want to do a web module (Apache), with it, user can delete, move files/folders uploaded by Proftpd
But Apache have not permision to manipulate with file/folder uploaded by proftpd.

How can I resolve this problem
Thank you very much!
LVL 1
bxglxbxglx2000Asked:
Who is Participating?
 
bxglxbxglx2000Author Commented:
oh, I've resolved my problem!

My way:

groupadd -g 5500 ftpgroup
adduser -u 5500 -s /bin/false -d /bin/null -c "proftpd_user" -g apache ftpuser

- In config file of proftpd:
If we want apache can manipulate on subfolder created by ftp, so we need set umask = 002, ==> subfolder created by ftp will has 775 of permission

and don't forget home dir:
CreateHome on 775 dirmode 775

0
 
svgmucCommented:
I assume your web server runs as apache:web.

If you upload in the $HOME of the user:

<Directory ~>
    UserOwner apache
    GroupOwner web
</Directory>

If you have a separate structure of upload direcories like /var/www/username/upload:

<Directory /var/www/*/upload>
    UserOwner apache
    GroupOwner web
</Directory>
0
 
bxglxbxglx2000Author Commented:
Thank you
I try as your guide, but not success!
Is there anymore setting with Umask?

I found some information here:
http://forums.proftpd.org/smf/index.php?topic=3311.0

But I don't how know to apply...

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
svgmucCommented:
Well, it will only work for new files and you have to give apache:web the correct permissions to the users' upload directories (rwx) and at least passthrough permissions (x) for every parent directory.

Does the apache error_log show anything?
0
 
bxglxbxglx2000Author Commented:
Yes, but how to set  Umask?

and My apache log announce: permissiion deny!
It can not write to Directory created (both old or new) by proftpd


0
 
svgmucCommented:
The Umask won't help you there, you have to permit access to the directories for the web server.

chgrp web /var/www/username/upload
chmod g+rwx /var/www/username/upload
0
 
bxglxbxglx2000Author Commented:
I don't understand user/group much
- When I list file upload by proftpd, I see Owner = 5500
but 5500 not found in /etc/passwd or /etc/group

So, how can I continue?

( I want apache and proftpd both have the same permision on File/Folder of each other)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.