- This topic is empty.
March 21, 2011 at 6:00 pm #30135
i have a phpbb script which runs a site chmod 0644 command after uploading a file. this was never a problem with my bftp server
once this script is run through cerberus. it causes the file to go into a read only hidden state. this cause a multitude of problems, such as the ability not to see these files on shares, or for that matter delete them since they are in a read only state???
are we sure the chmod commands are working correctly?
2011/03/21 13:46:49  FTP Connection request accepted from 10.0.1.21
2011/03/21 13:46:49  USER attach
2011/03/21 13:46:49  331 User attach, password please
2011/03/21 13:46:49  PASS ***********
2011/03/21 13:46:49  Native user ‘attach’ authenticated
2011/03/21 13:46:49  230 Password Ok, User logged in – This is an UNLICENSED copy of Cerberus FTP Server Personal edition
2011/03/21 13:46:49  PASV
2011/03/21 13:46:49  227 Entering Passive Mode (10,0,1,21,5,230)
2011/03/21 13:46:49  CWD
2011/03/21 13:46:49  250 Change directory ok
2011/03/21 13:46:49  TYPE I
2011/03/21 13:46:49  200 Type Binary
2011/03/21 13:46:50  STOR 0000_310.jpg
2011/03/21 13:46:50  150 Opening data connection
2011/03/21 13:46:50  Successfully stored file at ‘E:Webpageftpattach 000_310.jpg’
2011/03/21 13:46:50  226 Transfer complete
2011/03/21 13:46:50  SITE CHMOD 0644 0000_310.jpgMarch 21, 2011 at 6:22 pm #36146
i have dug into this furture.
it appears if you do a chmod 644 everything is fine, my script is doing a 0644, which is causing the problem.
it will be very hard to fix the script, cerberus is apparently interpreting this wrong???March 21, 2011 at 10:41 pm #36147
Cerberus follows the typical format ‘UGO’ User, Group, Other. I’m not sure what the leading number would be but we only support the usual 3 number format.March 21, 2011 at 11:36 pm #36148 yes but its accepting the code
take filezilla, and move a file over to ftp, then make mod permissions, use the number 0644. it does not throw an error… it should if its not supported
once you make this change, the file goes into read only hidden. it should at least error and it not be acceptable. its obviously making changes but not in a positive way.
can you at least test this and either make it throw an error, or ignore the leading 0? out of 4 ftp servers this is the only one that reacts this way.March 22, 2011 at 12:25 am #36149
Cerberus is interpreting the first 3 numbers as the user, group, and other fields and ignoring the last digit. I agree that this is incorrect behavior and needs changed.
There is a larger problem of interpreting what the CHMOD command should mean on Windows. To be honest, the current behavior I’ve implemented doesn’t make sense, even when only the normal 3 digits are provided. Cerberus should probably just leave the file alone when a SITE CHMOD is issued and return an OK code or error. CHMOD simply doesn’t make sense for a Windows FTP server.
I’m going to do some more research as to what the best approach should be to handling this command in Windows. The current approach sets the FILE_ATTRIBUTE_READONLY if no write permission is granted, and FILE_ATTRIBUTE_HIDDEN if no read permission is provided for the owner digit. The group and other digits are ignored. I’m not sure what I was thinking when I implemented that behavior (which was probably many years ago). I suspect ignoring this command is the best approach.
I will have it fixed for the next minor release. Thanks for bringing the problem to my attention.March 22, 2011 at 12:35 am #36150
great, thanks for taking the time to look into it.
Now i am not pushing at all since i am new to cerberus. generally how long does it take for a minor release to be published? i just want to know when i should come looking for the fix. its not a huge deal, the issue is on a delete for me, which is more rare then a store. so its not a big urgency, just a ballpark if you have a ideaMarch 22, 2011 at 12:46 am #36151
I should have a new minor release available towards the end of this week.March 22, 2011 at 1:21 am #36152Serin wrote:
I should have a new minor release available towards the end of this week.
thats amazing. thank you for the quick turn aroundMarch 28, 2011 at 5:03 pm #36143
any update?March 28, 2011 at 9:31 pm #36145 An updated version with the fixes noted above was posted yesterday. Version 188.8.131.52.March 29, 2011 at 2:25 am #36144 works perfect thanks a ton for the fix
- You must be logged in to reply to this topic.