[wp-trac] [WordPress Trac] #29610: FTPext Filesystem class can't detect isWritable, isReadable correctly
WordPress Trac
noreply at wordpress.org
Tue Jun 16 06:11:54 UTC 2015
#29610: FTPext Filesystem class can't detect isWritable, isReadable correctly
----------------------------+-------------------------
Reporter: programmin | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Filesystem API | Version: 2.5
Severity: normal | Resolution: maybelater
Keywords: | Focuses:
----------------------------+-------------------------
Comment (by dd32):
> So you're saying there could be a FTP server that would let you rewrite
files, yet not chmod those same files?
Yes, that.
But also that it may allow writing even though the chmod values returned
don't indicate writability.
For example:
* FTP user is www
* Files permissions are 664
* File is owned by apache:apache
Looking at that we can gather:
* user www != apache, therefor can't write
* Don't know our groups, therefor can't check that.
* global has read-only permissions, therefor can't write
Then take:
* FTP user is www
* Files permissions are 777
* Server denies file modifications
We can assume from that:
* File should be writable.
* Upon writing, we find the server still denies.
Then another case
* FTP user is www
* Files permissions are 644
* Files are owned by www:www
Then
* FTP user === file owner, ftp file permissions say we can write
* Upon write, FTP server or filesystem ACLs deny the action, file is
unwritable.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29610#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list