Closed GoogleCodeExporter closed 8 years ago
>posix_getuid();
>$tmp = posix_getpwuid
1) This functions are absent in the most of php configurations.
2) Your code is wrong. $this->uid must contain uid of *rtorrent* user. In your
code it contain uid of web user. Same for $this->home and $this->gid.
>Add system.set.umask = 0775
rtorrent and web users must have read/write access to files in /share. As
result - remove umask or place users to the same group.
Original comment by novik65
on 29 Jun 2012 at 3:22
You're right about the respective users -- my mistake.
But you can replace posix_getuid() with an XML RPC call which *returns* the
user ID or name, instead of doing that awful temp file mess -- if I understand
the code correctly, rXMLRPCRequest->run will return the return value of the
function called, so you could make a system call from rtorrent which determines
the user ID, and then call $posix_getpwuid($uid) from the result.
Original comment by damntras...@gmail.com
on 1 Jul 2012 at 5:02
1) Yet once. POSIX-like functions are disabled on a lot of seedboxes.
2) Main question: For which reason? "If it is working - don't touch it".
Original comment by novik65
on 1 Jul 2012 at 6:06
If those seedboxes are disabling POSIX functionality for security, why can we
assume they allow command line access -- especially command line access which
allows us to create files and gives us access to system utilities?
Further more, not all systems come with a compliant 'id' which supports the -G
flag, so even if we can invoke 'id', there's no guarantee it will do what we
need.
So to put this another way, it works assuming that you have shell access and a
working 'id' program -- but if we want to turn those assumptions into
'requirements', it makes much more sense to simply require that getuid() be
callable by the rtorrent program.
Original comment by damntras...@gmail.com
on 3 Jul 2012 at 12:05
>If those seedboxes are disabling POSIX functionality for security, why can we
assume they allow command line access -- especially command line access which
allows us to create files and gives us access to system utilities?
This is a simple. Because this is a true.
>Further more, not all systems come with a compliant 'id' which supports the -G
flag
Not all. Simple most of its.
As result: 1) I disagree with you 2) if you want to continue, please, use right
place for this. For example - forum.
Original comment by novik65
on 3 Jul 2012 at 6:04
Just wanted to post a comment in case people here are encountering the same
issue.
The real problem here is that umask is NOT the same as file permissions. A
umask value of 775 (like the bug creator made) basically gives you NO
PERMISSIONS. Try setting umask to something sensible like 002, and you will
see this error go away.
For more information, read the man page for umask.
Original comment by lukew...@gmail.com
on 26 Feb 2013 at 11:09
Original issue reported on code.google.com by
damntras...@gmail.com
on 29 Jun 2012 at 2:26