Replies: 1 comment 1 reply
-
That is just the default permission for a file when uploaded through sftp or the web interface. You can probably change the permissions recursively in the sftp client. In the web interface you would need to go file by file I believe. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Pterodactyl docs: https://github.com/pterodactyl/wings/blob/ec54371b86f17e7c124d66672afcadd214b25c86/sftp/handler.go#L161- to be replicated
Well, hello and I'm glad to see the development of a new project, Pelican. Since I work in the hosting field, we're talking about a multitude of services (+150) and the fact that there are hundreds of accounts with SFTP access, so I'll highlight a specific problem:
For certain services, if a file is uploaded via sftp (not web file manager), the default permissions are 644 for files and 755 for directories. Now, the problem is that for certain files, they need to be 755, otherwise, for example, at least in my case, there may be a problem with HTTP requests to download a certain file or simply a file cannot be read (more often referring to configuration files).
So, I made a python script based on watchdog (same result with inotify) that actively monitors and verifies the files I need from the folder where the services are mounted (updating permissions through os.chmod). Everything is fine and when I upload a file or create one, the permissions are immediately overwritten to 755, but only through the web file manager or an ftp client like filezilla. However, through winscp, even though the script has output that the files have been modified with 755 permissions, if I create or upload through winscp (the recommended launch program through the game control panel), the files remain with 644 permissions. Everything should happen in real time, directly with 755 permissions.
Has anyone encountered anything similar? I don't want to do it through umask because the owner of the containers is pterodactyl, so I don't know exactly what security risks there are. I can also do a chmod -R for everything in the folder where the containers are mounted (adding cronjob), but this could cause unexpected segfault (there are also temporary files), which I don't want.
Beta Was this translation helpful? Give feedback.
All reactions