Hi
.
I am trying to configure SFTP in my production server with Fedora 17 which is located in a data center in the UK.
I have created a group as follows:
groupadd sftp
I have edited the file etc/ssh/sshd_config to have:
Subsystem sftp internal-sftp
Match Group sftp
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
I have also stop and started the sshd.service with
systemctl stop sshd.service
systemctl start sshd.service
I have created a user as follows:
useradd -d /home/aurora -s /bin/bash -g sftp aurora
passwd aurora
As root I have made the following:
# usermod -G sftp aurora
# usermod -s /bin/false aurora
# chown root:root /home/aurora
# chmod 0755 /home/aurora
# mkdir /home/aurora/docs
# chown aurora.sftp /home/aurora/*
I can access remotly with cd to "docs" folder and when I try to upload (with put command) a file I get an error as follows:
[root@acerlaptop web]# sftp aurora@mysftpserver.com
aurora@mysftpserver.com's password:
Connected to mysftpserver.com.
sftp> cd docs/
sftp> put index.jsp
Uploading index.jsp to /docs/index.jsp
remote open("/docs/index.jsp"): Permission denied
I have no problem downloading files (with get command), my problem is with uploading (put).
I have made the very same configurations in a laptop with Fedora 18 that I am using in development in my office, I can access it with sftp, outside my network, and I have no problems with put (upload) or get (download).
I would appreciate it very much if anyone could kindly let me know what am I doing wrong and what should I do to solve this problem.
Thanks in anticipation.
Best regards.
.
I am trying to configure SFTP in my production server with Fedora 17 which is located in a data center in the UK.
I have created a group as follows:
groupadd sftp
I have edited the file etc/ssh/sshd_config to have:
Subsystem sftp internal-sftp
Match Group sftp
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
I have also stop and started the sshd.service with
systemctl stop sshd.service
systemctl start sshd.service
I have created a user as follows:
useradd -d /home/aurora -s /bin/bash -g sftp aurora
passwd aurora
As root I have made the following:
# usermod -G sftp aurora
# usermod -s /bin/false aurora
# chown root:root /home/aurora
# chmod 0755 /home/aurora
# mkdir /home/aurora/docs
# chown aurora.sftp /home/aurora/*
I can access remotly with cd to "docs" folder and when I try to upload (with put command) a file I get an error as follows:
[root@acerlaptop web]# sftp aurora@mysftpserver.com
aurora@mysftpserver.com's password:
Connected to mysftpserver.com.
sftp> cd docs/
sftp> put index.jsp
Uploading index.jsp to /docs/index.jsp
remote open("/docs/index.jsp"): Permission denied
I have no problem downloading files (with get command), my problem is with uploading (put).
I have made the very same configurations in a laptop with Fedora 18 that I am using in development in my office, I can access it with sftp, outside my network, and I have no problems with put (upload) or get (download).
I would appreciate it very much if anyone could kindly let me know what am I doing wrong and what should I do to solve this problem.
Thanks in anticipation.
Best regards.