Login
Register
Home
Wiki Knowledge Base
FreeDNS
Facebook
Linux Support
Control Web Panel
MENU
Home
Help
Search
Login
Register
Control Web Panel
»
WebPanel
»
CentOS 6 Problems
»
Pure-FTP Umask Not Working
« previous
next »
Print
Pages: [
1
]
Author
Topic: Pure-FTP Umask Not Working (Read 7661 times)
0 Members and 1 Guest are viewing this topic.
dhammer
Newbie
Posts: 2
Pure-FTP Umask Not Working
«
on:
June 05, 2016, 09:32:40 PM »
When I upload a new file to a test website I get the 500 error when attempting to view the page. It is because the file permissions (664) are wrong by default. I know you can edit the Pure FTP server config file to change the Umask so by default files have a permission of 644. For some reason on CWP this doesn't seem to work. Despite having the proper mask the files still end up with a permission of 664. I am running CWP on CentOS 6.8. This should work and it is driving me nuts. I've exhausted every other resource trying to find a solution to this problem. What is the solution to this?
Logged
dhammer
Newbie
Posts: 2
Re: Pure-FTP Umask Not Working
«
Reply #1 on:
June 05, 2016, 10:00:33 PM »
Of course now that I've posted this discussion I figure out the problem. Hours wasted. The solution as simple and I hope this post stays in the forum to server as a little help to other frustrated techies.
When you can't get Umask to work properly with FTP it never hurts to make sure you are connecting with FTP and NOT sFTP. I discovered this by accident when I connected to the server using FTP on another test VPS and discovered the perms were showing differently in the client. One was showing rwx and the other numbers like 0644. It was then that I figured all was not well in Kansas. That is when I realized I was an idiot and was working with the wrong protocol. I still needed to fix the Umask issue but that was fixed in sshd_config and not /etc/pure-ftpd/pure-ftpd.conf
I just edited /etc/ssh/sshd_conf and changed...
Subsystem sftp /usr/libexec/openssh/sftp-server
... to ...
Subsystem sftp /usr/libexec/openssh/sftp-server -u 022
Problem solved. At least I have a few hours left in my Sunday.
Logged
Elwazeery
Newbie
Posts: 14
Re: Pure-FTP Umask Not Working
«
Reply #2 on:
July 14, 2024, 01:18:42 AM »
I got this issue too, the umask is 133:022, and the new uploaded files are always 640 not 644
I tried your solution and not working, I really don't know what to do more
Logged
overseer
Hero Member
Posts: 1044
Re: Pure-FTP Umask Not Working
«
Reply #3 on:
July 14, 2024, 04:10:23 AM »
Did you check what your system's default umask is?
https://ngelinux.com/rhel-or-centos-what-is-umask-in-linux-and-how-to-set-it/
Logged
Print
Pages: [
1
]
« previous
next »
Control Web Panel
»
WebPanel
»
CentOS 6 Problems
»
Pure-FTP Umask Not Working