chmod 0644

Home Forums General Report a Bug chmod 0644

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #30135
    jxer
    Participant

    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 [0] FTP Connection request accepted from 10.0.1.21

    2011/03/21 13:46:49 [0] USER attach

    2011/03/21 13:46:49 [0] 331 User attach, password please

    2011/03/21 13:46:49 [0] PASS ***********

    2011/03/21 13:46:49 [0] Native user ‘attach’ authenticated

    2011/03/21 13:46:49 [0] 230 Password Ok, User logged in – This is an UNLICENSED copy of Cerberus FTP Server Personal edition

    2011/03/21 13:46:49 [0] PASV

    2011/03/21 13:46:49 [0] 227 Entering Passive Mode (10,0,1,21,5,230)

    2011/03/21 13:46:49 [0] CWD

    2011/03/21 13:46:49 [0] 250 Change directory ok

    2011/03/21 13:46:49 [0] TYPE I

    2011/03/21 13:46:49 [0] 200 Type Binary

    2011/03/21 13:46:50 [0] STOR 0000_310.jpg

    2011/03/21 13:46:50 [0] 150 Opening data connection

    2011/03/21 13:46:50 [0] Successfully stored file at ‘E:Webpageftpattach000_310.jpg’

    2011/03/21 13:46:50 [0] 226 Transfer complete

    2011/03/21 13:46:50 [0] SITE CHMOD 0644 0000_310.jpg

    #36146
    jxer
    Participant

    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???

    #36147
    imported_Serin
    Participant

    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.

    #36148
    jxer
    Participant

    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.

    #36149
    imported_Serin
    Participant

    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.

    #36150
    jxer
    Participant

    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 idea

    #36151
    imported_Serin
    Participant

    I should have a new minor release available towards the end of this week.

    #36152
    jxer
    Participant

    Serin wrote:

    I should have a new minor release available towards the end of this week.

    thats amazing. thank you for the quick turn around

    #36143
    jxer
    Participant

    any update?

    #36145
    imported_Serin
    Participant

    An updated version with the fixes noted above was posted yesterday. Version 4.0.9.1.

    #36144
    jxer
    Participant

    works perfect thanks a ton for the fix

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Close Cart

Shopping Cart