Issue to set it up
Hi,
I used the below commands to create SFTP user sudo adduser edfiles sudo mkdir -p /var/sftp/uploads sudo chown root:root /var/sftp sudo chmod 755 /var/sftp sudo chown edfiles:edfiles /var/sftp/uploads how to ensure that I would be able to folder like uploads, when I access SFTP, which is sftp://113.255.213.124/ |
You are giving 755 permissions to directory sftp, it means other users can read and execute the files of directory sftp. They can not write into it.
If you open directory /var/sftp/uploads by log into user edfiles, you can still see the content of parent directory /var/sftp, but you can not write into it as directory does not have write permission for groups and others. If you loginto the directory uploads by user edfiles using protocol sftp, you can use ssh command ssh edfiles@113.255.213.124 It will log into home directory of edfiles, now you can open directory /var/sftp/uploads using command cd I hope port 22 is opened for given IP |
Yes, port 22 is open and what to check next, below (as I've got Permission denied). (IP is little bit different from the one originally mentioned)
[root@CentOS65x64 huamin]# ssh edfiles@113.255.219.215 Address 113.255.219.215 maps to 215-219-255-113-on-nets.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT! edfiles@113.255.219.215's password: Permission denied, please try again. edfiles@113.255.219.215's password: |
Accept the request, it will add an entry in ~/.ssh/known_hosts file.
After creating user I hope you have set password for the user using passwd command. Now it should ask password. After successful login, you will land into home directory of logged in user. Now you can use cd to go into your desirable directory. |
Quote:
https://www.linuxquestions.org/quest...tp-4175654907/ They're trying to just set up a user for anonymous uploads via SFTP. They were told explicitly to set up the user with no shell access, and that they'd have to chroot SFTP. They apparently haven't done anything except to add a generic user account. And Huamin, your question of "how to ensure that I would be able to folder like uploads, when I access SFTP, which is", seems pointless. Mainly because you could have just tried to upload a file and seen for yourself what the results were, quicker than you could have posted this. And again, if you cannot set up a user account correctly, don't know the basics of folder permissions, and can't/won't do any basic research about messages, you really should let your administrator set things up. |
Quote:
No false advice should be given by me, that was my only concern. If OP is not following the solution given by other senior members, it may be ok but returning here after long time, I should not provide any wrong solution. Well I should try my luck on easier questions.:) |
Quote:
They didn't tell you that their actual goal was to create an anonymous user, with no password (per their other thread), nor did they give you any other bits of information that the put in their other thread about this same issue. |
Quote:
Huamin: You must answer these questions to get any further help! What is the home directory of the edfiles user? What are the permissions on that directory? What password did you assign to the user edfiles? Where did you do that? (You don't show doing that here) [You don't need to tell us the password, but can you answer that question to yourself?] |
Quote:
|
Quote:
Home path of "edfiles" is /home/edfiles. Here is permission of the path. [huamin@CentOS65x64 home]$ ls -l total 36 drwx------ 25 edfiles edfiles 4096 Jun 13 18:25 edfiles EKLavya, After having created the user, how to make use of it, when accessing SFTP? |
Quote:
What command are you entering and what response are you getting? |
When getting into
sftp://113.255.213.124/ I expect to have control to the path like to have proper user account having write permission. |
Quote:
how are you connecting with sftp? Are you on a Linux client machine at the terminal? What command are you entering and what response are you getting? |
I used one other Windows machine to access
sftp://113.255.213.124/ I can get into it but I expect to have proper control by user account and to have also write permission to it. You can try now and you should be able to get into it. |
Quote:
how are you connecting with sftp? Are you on a Linux client machine at the terminal? ... I"m guessing that's a no...it's a yes or no question. Why can't you answer it? What command are you entering and what response are you getting? Where are you entering that? In a browser? In Windows Explorer? <sigh> |
All times are GMT -5. The time now is 10:33 PM. |