Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I bought a web hosting plan and trying to set up my web site. It's a Linux sharing hosting, using CPanel 10.8.2-RELEASE 119. When setting ftp accounts, face some difficulties to set up the structure.
Below is what I hope to obtain:
1. A main ftp account which can upload and download from any of the directories.
2. A few download only ftp account which can only download from their respective home directory and no where else.
3. A few upload only ftp account which can only upload to their respective home dir and no where else.
I start by creating ftp account in FTP Manager of CPanel, then using shell access hope to use chmod to get what I want. But realise that all the folders created belong to the main account both under user and group. No matter how I chmod, it will affect both the main account and the download account at the same time. I can't seperate them, ie. to let main account have read, write, access, and download account have only read and access permission.
My provider also still figuring how to get around with this.
Should be running Pure-FTPd.
I used dos command prompt to login in and this is the welcome message:
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 09:06. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Quote:
Originally Posted by Mara
It depends on the ftp server used. Do you have any chance to get that info?
You are not going to be able to set up an account that can upload/download to/from any directory. The only account that can do that is root, and 99.9% of ftp servers do not allow root to login through ftp, for the simple reason that it is hyper unsecure.
The "standard" procedure to get around this is to upload the files into a home directory of a standard user, then through SSH, sign in as that regular user, elevate permissions to root, move the files to the restricted folder (/var/www/?), then change ownership and permissions as necessary. Sounds like a lot of work, but it is just a few commands.
As for the other things you asked about, it is fairly standard procedure to chroot users into their home directory through ftp. That only gives them access to their home, and nowhere else. They can both upload and download this way, which generally isn't a problem, as they are the owners of every file they can see. Google for for to do that with pro-ftp. In vsftpd, it is one line in the conf file, and probably similiar with pro-ftp.
But what I mean was not as a root user, I am just one of the normal user the web hosting company created for me to login. This is the main user account where I can upload/download anywhere in my web space. I used FTP Manager in CPanel to create some more ftp user accounts. Those ftp user account are not a username in the server.
when I login as main account in ftp, I just type in the username, eg. david but when login with those account created by FTP Manager, have to type in username@mydomain.org at the userid field. Those account indeed have their own home dir and they are indeed restricted inside there. But how to set so that they are read only account?
By the way, is there a way to not to type in username@mydomain.org as userid, I just hope to type in the username only.
TIA
Quote:
Originally Posted by JimBass
You are not going to be able to set up an account that can upload/download to/from any directory. The only account that can do that is root, and 99.9% of ftp servers do not allow root to login through ftp, for the simple reason that it is hyper unsecure.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.