Koozali.org: home of the SME Server

chroot ftp / dungog / 6.0b3 / "broken"

Jim Danvers

chroot ftp / dungog / 6.0b3 / "broken"
« on: November 20, 2003, 12:40:52 AM »
Howdy guys...

Helping out a guy @work putting together a box and he has a need to ftp into the primary html share so as to use the web authoring software that he is familiar with (DreamWeaver).  Long story short:  the chroot is working as it is dumping him into the appropriate directory, but he cannot add any files (550 permission denied).  Again - this is the primary share (he owns a domain, thus he wants http requests to hit at the root, vs. some i-bay) - so the chroot is /home/e-smith/files/ibays/Primary/html.

Any ideas / suggestions on a work-around / fix / template mod?

Thanks...

-=- jd -=-

Reinhold

Re: chroot ftp / dungog / 6.0b3 / "broken"
« Reply #1 on: November 20, 2003, 01:44:53 AM »
Jim -  (welcome to a real OS .-)
...check & change permissions (chmod)
...usually "Primary/html" is "write" for user root only

Jim Danvers

Re: chroot ftp / dungog / 6.0b3 / "broken"
« Reply #2 on: November 20, 2003, 07:07:24 AM »
Thanks Reinhold...

Another question then:  I went in and changed the group of the primary/html directory to match the same group that myself and the guy that I'm helping out are in (we call the group 'adms', as in admins... ).   I did this:

pwd
/home/e-smith/files/ibays/Primary

chgrp -R html

... then tried ftp'ing something in and still got told to go away.   Still a permissions issue..., ok.  So then (still parked at the same place in putty session) I did this:

chmod -R 775 html

Now I can ftp stuff up.  Am I on the right track here?  As I understand it (and this is a pretty loose understanding), 775 will basically be full control for owner and group, and read/execute for world, yes?  I'm kind of wondering about the execute for world though....   I'm thinking that perhaps that should only be read?

This box that we are working on / playing with is NOT available to the world @present (its behind a firewall and it is in server only mode anyway) so even if we (I) do have permissions wacked, its not a big deal (yet).  We do of course want to get it as right as possible before exposing it out on the wire...

Thanks again...

-=- jd -=-

Baddogg

Re: chroot ftp / dungog / 6.0b3 / "broken"
« Reply #3 on: November 20, 2003, 04:36:04 PM »
make sure port 21 is routed to the SME box in the firewall
chmod the Primary/html folder and contents
ftp in as admin

This works for me....

might be a security issue here, but it allows me to play with my html anywhere.

cheers

Reinhold

Re: chroot ftp / dungog / 6.0b3 / "broken"
« Reply #4 on: November 20, 2003, 11:08:34 PM »
Jim,

...looks good (enough) to me .-)

Actually what you describe is "777" the one you used "775" means:
read by owner & write by owner, execute-search by owner,
read by group & write by group, execute-search by group
read by others,-------,execute-search by others

NOTE: If you are not comfortable with stuff like that use it inside Midnight Commander (just type "mc")  and you will find in detail (also there are extended attributes which mc sets for you nicely).
Just click the filename, FILE, chmod ... voila
BTW: Don't forget about the owner attributes !!!

boris

Re: chroot ftp / dungog / 6.0b3 / "broken"
« Reply #5 on: November 21, 2003, 07:01:36 AM »
Jim,

>>
I'm kind of wondering about the execute for world though.... I'm thinking that perhaps that should only be read?
>

execute permissions for the folder is needed to change directory to the folder (open the folder). It is not the same as execute the script or program. If this is public site and world needs to see the files in the folder, execute for the folder is needed.
Files inside this folder is a different story. In most cases they don't need to have execute by world permissions, only read.

Jim Danvers

Re: chroot ftp / dungog / 6.0b3 / "broken"
« Reply #6 on: November 22, 2003, 04:48:43 AM »
Thanks for the info Boris.  That makes sense.

-=- jd -=-