Redhat linux 6.1: Permission denied while copying a file using sftp with root user
Hi,
I am trying to copy a file from my system to linux server using root user through sftp but am getting a dialogue box with following error. "cannot create remote file Permission denied. Error code:3 Error message from server: Permission denied" I get the same error if i try to edit a file. OS version is RedHat linux 6.1, 2.6.32-131.0.15.el6.x86_64 I will appreciate any help in this regards. Thanks |
You have a server that allows SSH as root?
|
Quote:
# override default of no subsystems #Subsystem sftp /usr/libexec/openssh/sftp-server # for local sftp jailsetup Subsystem sftp internal-sftp -f AUTHPRIV -l VERBOSE # Example of overriding settings on a per-user basis #Match User anoncvs # X11Forwarding no # AllowTcpForwarding no # ForceCommand cvs server # setup for sftponly user group Match Group sftponly ChrootDirectory /ddrive/ftp/%u X11Forwarding no AllowTCPForwarding no ForceCommand internal-sftp |
Quote:
Also, you say you're trying to copy a file using sftp...why not just use SCP instead? And a dialog box? What client are you using?? And most importantly, have you contacted Red Hat support and/or checked their knoweldgebase? Since you're paying for RHEL (RIGHT??), you have access to the Red Hat knowledgebase, which can answer much about SSH configuration on an RHEL server. |
Thanks for you reply.
Actually i was trying with another user which has access to some directories where i wanted to change files but could not so i tried using root user but no luck. Something looks wrong but don't know where. From console using root login i can edit files but it does not allow me to edit using sftp client. It's a requirement from the programmer that they use sftp and copy and delete some files through scripts. |
I found following configuration in sshd_config file
# override default of no subsystems #Subsystem sftp /usr/libexec/openssh/sftp-server # for local sftp jailsetup Subsystem sftp internal-sftp -f AUTHPRIV -l VERBOSE # Example of overriding settings on a per-user basis #Match User anoncvs # X11Forwarding no # AllowTcpForwarding no # ForceCommand cvs server # setup for sftponly user group Match Group sftponly ChrootDirectory /ddrive/ftp/%u X11Forwarding no AllowTCPForwarding no ForceCommand internal-sftp |
Quote:
Quote:
|
I am not sure about RHEL support, will check with DB guy.
We have two users let say User1 & User2. User1 will right a file in some directory. User2 will read the content of file and delete it(which is not happening in my case) Both users are in different groups.(although i tried putting them in same group but issue still persists) I have even tried changing permission for that directory to 777 but no success. |
Quote:
Quote:
Whoever is writing this application isn't doing a very good job of defining how things should work. |
I'm new to the company so don't have much information.
I used to work with Linux in the past but am not very good in advanced linux administration. The task we need is very simple, as you said that users can see their own directories, this is what we need for two users that they can add or delete anything in their directories using a sftp client through script. If a user has rwx access to a directory or owns a directory then why it cannot add/delete files in that directory? this doesn't make any sense. I used Linux Gentoo before and i used to edit files using sftp clients without any issue. Appreciate your help! |
Quote:
Quote:
Quote:
Quote:
|
After i disabled SELinux, issue is fixed.
|
All times are GMT -5. The time now is 03:39 AM. |