Hello,
Thank you for your response. If I disable SELinux or run setenforce 0 I can upload files to that directory /var/www/html/httpdocs. setenforce 0 command doesn't work after system being locked or when I sign off as root and if I try to upload files again, I have to run the setenforce 0 command again which I think it is not a smart solution. I did everything from the link
http://stackoverflow.com/questions/4...rmission-issue. Here is how I did;
[root@php ~]# mkdir /var/www/html/httpdocs
[root@php ~]# cd /var/www/html/
[root@php html]# ls -l
total 4
drwxr-xr-x. 2 root root 4096 Jun 2 09:12 httpdocs
root@php html]# useradd webadmin
[root@php html]# chown webadmin:webadmin /var/www/html/httpdocs/
ls -la /var/www/html/httpdocs/
total 8
drwxr-xr-x. 2 webadmin webadmin 4096 Jun 2 09:12 .
drwxr-xr-x. 3 root root 4096 Jun 2 09:12 ..
[root@php html]# setfacl -d -m u:apache:rwx /var/www/html/httpdocs/
[root@php html]# setfacl -d -m g:apache:rwx /var/www/html/httpdocs/
I did this also because I still had problem just running the two above commands!!
[root@php html]# setfacl -d -m u:webadmin:rwx /var/www/html/httpdocs/
[root@php html]# getfacl /var/www/html/httpdocs/
getfacl: Removing leading '/' from absolute path names
# file: var/www/html/httpdocs/
# owner: webadmin
# group: webadmin
user::rwx
group::r-x
other::r-x
default:user::rwx
default:user:apache:rwx
default:group::r-x
default:group:apache:rwx
default:user:webadmin:rwx
default:mask::rwx
default
ther::r-x
This is when I do cat /etc/passwd for webadmin;
webadmin:x:501:501::/home/webadmin:/bin/bash. He is able to login via ftp and upload any file to his home directory but I want him to be able to upload to /var/www/html/httpdocs directory. When I changed his home directory to /var/www/html/httpdocs by running this command usermod -d /var/www/html/httpdocs/ webadmin, he can login and directory listing is successful but I get critical file transfer error when I try to upload a file.