We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Excessive file permissions – Server SFTP

  • #9771
    Avatar photo[anonymous]


    When I synchronise the web files using the Server – SFTP option, the files are uploaded to host with too many permissions. By default, all HTML files, images, css, etc. are created with 666 permissions. This is unsafe. Using 644 permissions is sufficient.

    I’m looking at the program settings but I don’t see that I can change this.

    Thanks in advance.

    Avatar photo[anonymous]

    Hi luci,

    Thank you for reporting this. It seems that used SFTP library uses too wide permissions by default.

    I have checked and it seems that when we have implemented SFTP support their documentation does not state about such default permissions. Also we did not spot this issue, because it seems that our VPS server used for tests forces lower permissions for files (it is possible to force permissions for files uploaded via sftp/scp protocol).

    I have prepared a fix which after uploading files set their chmods to 0644 and for folders set chmods 0755. It will be available in Publii v.0.42.1 which will be probably released at nearest Monday.