|
Posted by Jerry Stuckle on 12/30/05 05:24
jab3 wrote:
> So I'm considering a small project that involves online file storage.
> Let's say I wanted to set up a site that allows people to log-on,
> create an account, and then have space to upload files. The problem
> I'm having concerns permissions, basically.
>
> 1) How do I automatically create users in Linux from a PHP script
> running under Apache's uid/gid?
You can't. You need to be running as root.
>
> 2) Once 1 is done, how, when they log back on (authenticated with SQL
> which will keep up with their username), do I allow them access to
> their files for download? I would like to use Linux file permissions
> to try and have some sort of security (i.e., would like to store users'
> files under /home/[user]/files), but how do I allow the PHP script to
> securely access their files, when the script runs under the Apache uid?
> Is this a job for suExec?
>
Again, you need to be running as root to be able to change file
permissions for someone other than the Apache process.
> Any input will be appreciated, and I will clarify anything that is
> unclear.
>
One way to do the above is suexec. Or you can start batch jobs to do
the work. One thing you do NOT want to do is give the Apache process
root privileges.
>
> Thanks,
> jab3
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|