Tag: selinux
FTP not working?
by z3n on May.24, 2011, under Linux Happyness
Problem:
FTPd is working however when you try to login you get access denied on user’s home folder, no matter what accesses and group/user combination.
Solution:
Check /var/log/audit/autit.log and /var/log/messages
This usually is a SELinux block, fix it using:
setsebool -P ftp_home_dir=1
Knowing when SELinux is enabled
by z3n on May.02, 2009, under Linux Happyness
Problem:
how to know when SELinux is enabled, disabled or on permissive mode.
Solution:
getenforce
How to change SSHD port
by z3n on Mar.30, 2009, under Linux Happyness
Problem:
how to change sshd port in order to avoid script kiddies attacks and lower your cpu usage (brute force password attacks)
Solution:
vi /etc/ssh/sshd_config
change Port XX value
service sshd restart
Now you should test ssh with the new port, i don’t need to say that you shouldn’t disconnect the first session in case something goes wrong.
If the ssh don’t work for you on the new port you probably got selinux rule for the ssh enabled, to check try this:
semanage port -l | grep ssh
if you have the selinux rule enabled for ssh, this command will return this:
ssh_port_t tcp 22
now we should add a new rule (since it’s impossible to remove the default one) for the ssh, allow it to listen on a different port of your choice:
semanage port -a -t ssh_port_t -p tcp ####
where #### is the port you configurated for sshd (doh!)
then now all you have to do is restart sshd and done!
Zend and Fedora Issue
by admin on Oct.17, 2008, under Linux Happyness
Problem:
Failed loading /usr/local/Zend/lib/Optimizer-3.3.3/php-5.1.x/ZendOptimizer.so: /usr/local/Zend/lib/Optimizer-3.3.3/php-5.1.x/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied
Fix:
setenforce 0 (and restart httpd) and disable SELINUX here: /etc/selinux/config SELINUX=disabled to have this set next time you boot the machine.