Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: oseano on October 20, 2004, 11:56:32 AM
-
Dear All,
Users need their personal webspace (like http://domain.com/~users), so I follow the tutorial in this site. I use dungog-proftpd-chroot-0.1-2.noarch.rpm and e-smith-user-webspace-0.1-3.noarch.rpm
The installation is OK, but when the user upload file to their home directory, the files always got the permission 660, so can't access from website (access denied). I have to manually chmod the files to 664 so everybody can access via browser.
How to set the permission to every files uploaded by users automatically set the permission to 664 ?
Thx for help,
Sean
-
oseano...
We map the public_html folder for the users and the permissions are handled via samba.
http://mirror.contribs.org/smeserver/contribs/thaynes/E-Smith/howto/samba/ has a fragment for the the config that we used last year when we were using SME.
Regards... Tom
-
Hi, haynest.......
Thank you for the info.
I already follow the guide from the url, but got the same results.
Any other info ?
Thx,
Sean Oseano
oseano...
We map the public_html folder for the users and the permissions are handled via samba.
http://mirror.contribs.org/smeserver/contribs/thaynes/E-Smith/howto/samba/ has a fragment for the the config that we used last year when we were using SME.
Regards... Tom
-
Sean...
Did you install the samba permissions fragment from _my_ URL? I have the fragment posted there that we used in addition to the standard instructions in order for it to work with the mapped drives here on our campus.
If your users author via ftp, then you have another fragment to attend to.
This one works with samba if that is how you are using it.
Regards... Tom
-
Dear haynest,
Yes, The user using ftp to login to the server. Some from internal network and others from external. Could you please guide me to the other fragment for the ftp ?
Thx,
Sean Oseano
-
Sean...
I don't currently have an SME install to check files.
Maybe there is someone out there who has done this already and has a working fragment to change the userdir permissions when users write via ftp.
Regards... Tom
-
Tom,
Apreciate for the info.
Anyone can help me ?
Please...
Thx
Sean Oseano
Sean...
I don't currently have an SME install to check files.
Maybe there is someone out there who has done this already and has a working fragment to change the userdir permissions when users write via ftp.
Regards... Tom
-
Does anyone have some help for Sean?
I may be able to install SME on a spare machine if it comes to that, but there has to be someone who has dealt with this before.
-
Hi, haynest
Big thax for that Buddy.
I really need this solutions, coz our users need to upload files via ftp to their home directory and can be access from website.
Anyone that already done this in SME 6.01, I really need your help.
Thx,
Sean Oseano
Does anyone have some help for Sean?
I may be able to install SME on a spare machine if it comes to that, but there has to be someone who has dealt with this before.
-
Sean...
Take the zip file at and unzip it.
http://academies.culver.org/proftpd.conf.zip
Move it to /etc/e-smith/templates-custom/etc with WinSCP or similar
/sbin/e-smith/expand-template /etc/proftpd.conf
Restart your server (or just proftpd).
New files created via ftp in the home directory will be 755 permissions on the directories and 644 on the files.
Enjoy... Tom
-
Hi, haynest.
Thx for the files, follow your instruction.
Try to conect using ftp client, create directory, but now I got 770 instead of 664.
upload files got 660 instead of 755.
Any suggestion ?
Anyway, Thx foe help me,
Sean
-
Sean...
If you got 770 for an uploaded directory after the changes, that sounds like a umask of 007. You want 755 on the uploaded directories in public_html.
Likewise the uploaded file with 660 permissions is a umask of 007. You want 644 on the uploaded files for the public_html folder.
The 007 is the old umask prior to the changes.
Did you expand the template?
Did you restart proftpd?
If you check in /etc/proftpd.conf after expanding the template, you should have the following in one section.
<Directory ~/home>
AllowOverwrite on
Umask 022
<Limit WRITE>
AllowAll
</Limit>
</Directory>
To expand the template, run
"/sbin/e-smith/expand-template /etc/proftpd.conf" from the command line with no quotation marks. It is possible to cut and paste the command into WinSCP or PuTTY without retyping it.
The changes will only affect the permissions on files created after the template is expanded and the proftpd is restarted.
Regards... Tom
-
Thx Tom for reply.
I download the script and then using winscp copying 30UserDirAccess to /etc/e-smith/templates-custom/etc
From comand line I expand the template using
"/sbin/e-smith/expand-template /etc/proftpd.conf"
After that restart the server.
And from /etc/proftpd.conf , I got :
<Directory ~/home>
AllowOverwrite on
Umask 007
<Limit WRITE>
AllowAll
</Limit>
</Directory>
Should be Umask 022, but I got Umask 007.
I use dungog proftpd which I download from
http://www.dungog.net/sme/files/dungog-proftpd-chroot-0.1-5.noarch.rpm
Sean OSeano
-
The entire proftpd.conf directory in the zip file needs to go in /etc/e-smith/templates-custom/etc
Then expand and restart.
For the time being as a temporary thing you could change the proftpd.conf in /etc directly and restart the service.
I have never used the dungog proftp...
-
Hi, Tom
Problem solved, thank you very very much.
I make big mistake by copying
30UserDirAccess to /etc/e-smith/templates-custom/etc
should be copying to:
/etc/e-smith/templates-custom/etc/proftpd.conf
again thank you very much for help. I really appreciate what you've done for me.
Really nice community, where everyone helping each others.
Have a nice day,
Sean Oseano