Download
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.

File Permissions issue with sftp

  • #9141
    Avatar photo[anonymous]

    Last week my website was transferred to a new platform. From then on, Publii throws an error when testing the sftp connection to the server:

    ‘Error.Application was able to connect with your server but was unable to store files. Please check file permissions on your server’ .

    Since Filezilla works fine, the problem seems to be with Publii, or with settings at my web hosting company. Their help desk made some suggestions, especially about the remote path to set, but none of them helped.

    This problem is also mentioned in a topic on this forum that is closed to replies. There the solution had to do with SSH. Could it be that the version my web hosting company uses is not compatible with Publii? My web host uses OpenSSH_8.4p1 Debian-5+deb11u1.

    Anyone have suggestions that might lead to the solution?

    #9146
    Avatar photo[anonymous]

    I was having the same issue with a Netlify instance (actually twice). I got the same error message although the server was fine. Once it came out of nowhere, and the other time it occured after my laptop crashed while syncing my website.

    I just tried syncing on a different pc (desktop) and it worked somehow. Not sure, but it may be that an older version of Publii was running on the desktop.

    #9147
    Avatar photo[anonymous]

    Hi Gyges,

    I’m using the latest version of Publii on my MacBook Air with M2 processor. But I will try to connect with my server from a Windows PC. It’s worth the try, I guess.

    #9152
    Avatar photo[anonymous]

    Hey <span class=”f-author-name”>rhertogs</span>,

    I reveived your message via email, but it doesn’t show up here somehow…
    So it worked on your windows laptop?

    #9153
    Avatar photo[anonymous]

    I’m getting this error: Failed to load plugin: wpdialogs from url https://forum.getpublii.com/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js

    #9156
    Avatar photo[anonymous]

    Hi Gyges,

    Yes, on a Windows laptop the latest version of Publii works flawless with the platform of my webhosting company.

    After that I’ve tested the latest version of Publii on my Mac with the ftp-servers from some of my clients (other webhosting companies then mine). Publii works flawlessly there too. So my webhosting company seems to have a problem with sftp-connection with a Mac on their new platform. They have promised to look into it. I’ll keep you posted!

    #9159
    Avatar photo[anonymous]

    I think it’s rather a Publii bug, since it occurs on some OS (Linux here), but on others it does not. Also it occurs with ftp and Netlify.

    #9176
    Avatar photo[anonymous]

    Hi,

    Maybe it is issue with SFTP protocol – but as I see – we are using the latest version of ssh2-sftp-client node module, so probably it is nothing obvious like old version of the package.

    rhertogs – if you will be able to spot a reason of this issue with your hosting company – it would be also great 🙂 The mentioned error occurs when Publii successfully connects to the server and then tries to write and remove test file (called publii.test) on the server. If write or remove operation fails – it returns such message. If you see on your server publii.test file, it can suggest that remove operation failed.

    #9186
    Avatar photo[anonymous]

    Hi Tomasz,

    I checked the ftp-server. No sign of the file ‘publii.test’ in the subdomain where Publii tries to connect to.

    #9192
    Avatar photo[anonymous]

    Hi rhertogs,

    So in this case, we probably must wait for reply from your hosting – maybe it is some specific case.

    You can also try to check if you have something useful under Tools -> Log Viewer -> deployment-*.log files (you can attach them as private reply)

    #9200
    Avatar photo[anonymous]
    This reply has been marked as private.
    #9204
    Avatar photo[anonymous]

    Hi rhertogs – what kind of authentication method are you using?

    SSH with key or password?

    If you are using SSH with key – which algorithm is used in this key?

    #9207
    Avatar photo[anonymous]

    Hi Tomasz,

    I have tried both and both failed. I use ed25519 with the ssh key method.

    #9232
    Avatar photo[anonymous]

    In this case I suppose that we need some feedback from your hosting company :/

    #9235
    Avatar photo[anonymous]

    Unfortunately, all their tips and attempts turned out to be dead ends. The same goes for my own attempts to solve this problem. I think I’m going to uninstall Publii and all the files it leaves on my Macbook and reinstall Publii and restore the websites with the backups. Kind of a desperate attempt, but who knows, it might help…

    #9236
    Avatar photo[anonymous]

    I think it won’t help.

    Are you able to create a test account for me on your hosting and provide me temporary test access data in a private reply?

    #9237
    Avatar photo[anonymous]

    As it looks now, I solved it myself. I went through the entire thread of Publii, taking my own attempts and schools of thought, and came to the conclusion that this must be something from my individual Macbook. A corrupt file or something. I don’t know if this is of any help to you, but I’ll just mention what I did that led to the solution. it’s unfortunately a case of ‘it worked, but don’t ask me why’.

    I deleted the Publii folder in the Library folder of my home directory in the Application Support folder on my Macbook. That creates much the same situation as a fresh install of the app, completely without settings, preferences, and so on.

    Then with a backup I made earlier from Publii, I restored the website in Publii. Publii then seemed to be able to synchronize the website, but it kept hanging somewhere along the way. I ended up putting the original Publii folder back into the Application Support folder.

    This restored the original situation, including not being able to connect to the sftp server, you would say. Only now it worked miraculously. A test with a few small text changes and synchronization was successful. I really can’t explain it, but I’m glad it works.

    I hope these are the last words we have to devote to this. Thanks for thinking along!