Koozali.org: home of the SME Server

User webspace problem

Bjarke

User webspace problem
« on: November 18, 2003, 12:43:15 AM »
Hi
I have applied the User Webspace rpm to ver. 5.6 and it works fine
user can upload files to the public_html but when they create  a directory
it gets the permission of 0774 instead of 0755

How can i  correct this problem ?

Thanks in advance
Bjarke Koefoed

Abe Loveless

Re: User webspace problem
« Reply #1 on: November 18, 2003, 01:09:52 AM »

Bjarke

Re: User webspace problem
« Reply #2 on: November 18, 2003, 01:27:10 AM »
Thanks Abe

I have looked at the smb.conf and it didnt work for :-(
I am using the "e-smith-user-webspace" the ~user thing

BjarkeAbe Loveless wrote:

Abe Loveless

Re: User webspace problem
« Reply #3 on: November 18, 2003, 01:32:45 AM »
Hmm... well the other option would be this script, that runs every so often to reset the permissions.

It's not pretty, but it works.
http://www.tech-geeks.org/contrib/loveless/chmod-webdirs/

Tom Haynes

Re: User webspace problem
« Reply #4 on: November 18, 2003, 03:25:48 AM »
The default permissions for files created via Samba should be directory 755 and file 644. This can be changed in /etc/e-smith/templates-custom/etc/smb.conf/50homes. To activate the change /sbin/e-smith/expand-template /etc/smb.conf and then /etc/rc.d/init.d/smb restart. If the new directories created don't have 755 permissions, nonowners (like the www user) won't have access to the pages created inside. At the very least everyone has to have read access to the files created.

http://mirror.contribs.org/smeserver/contribs/thaynes/beta/howto/samba/

At the bottom of the page is a link to a 50homes.txt file.

Save the file, rename it to 50homes, and place it in

/etc/e-smith/templates-custom/etc/smb.conf/

expand, etc.

I am using this at a school with a bunch of users, and the web page permissions work great.

Bjarke Koefoed

Re: User webspace problem
« Reply #5 on: November 18, 2003, 03:32:17 AM »
Tom Haynes wrote:
>
> The default permissions for files created via Samba should be
> directory 755 and file 644. This can be changed in
> /etc/e-smith/templates-custom/etc/smb.conf/50homes. To
> activate the change /sbin/e-smith/expand-template
> /etc/smb.conf and then /etc/rc.d/init.d/smb restart. If the
> new directories created don't have 755 permissions, nonowners

Thanks but sorry Tom
It dosnt work for me, i have tried it, but no go, via FTP it does not work
for me at least

Bjarke Koefoed

Tom Haynes

Re: User webspace problem
« Reply #6 on: November 18, 2003, 03:58:24 AM »
Bjarke...

We create the pages on a samba share. I am assuming your situation is mine.

The issue is one of permissions, and this one with samba took me a while to figure out (I am a little slow), but it works great in our situation.

I don't have an e-smith box in front of me to check, and I have never turned the ftp on with one, but isn't there an ftp.conf similar to the smb.conf?

Sorry...   Tom

Bjarke

Re: User webspace problem
« Reply #7 on: November 18, 2003, 10:08:15 AM »
Yes there is an "ftp conf" called proftpd.conf and yes permissions for the files
is located here.... but not for user created dirs within public_hml ??? they get set to 0774

So you see it's hard to find but i will keep looking

Bjarke

Tom Haynes wrote:
>
> Bjarke...
> ........ but isn't there an
> ftp.conf similar to the smb.conf?

Mike O'Leary

Re: User webspace problem
« Reply #8 on: November 26, 2003, 02:31:00 AM »
FTP really screws up, you can use teh script provide by loveless to do teh change, but i have found another way

its is using the proftpd.conf file in /etc

here is part of the file
You change this part, i think it is Umask 011 but you change it to 022

    AllowOverwrite on
    Umask 022

proftpd.conf
--------------------------------------------------------------------

DefaultRoot      /home/e-smith/files
DefaultServer      on
DenyFilter \*.*/
DisplayFirstChdir   .message
DisplayLogin      welcome.msg
Group         public
IdentLookups off
MaxInstances      30
ServerAdmin      admin@informationmanagement1
ServerIdent      off
ServerName      "ProFTPD e-smith installation"
ServerType      inetd
UseFtpUsers      on
UseReverseDNS off
User         public
Port         21

 
    DenyAll
 

 
    DenyAll
 



  AllowAll



    AllowOverwrite on
    GroupOwner shared
    Umask 027
   
        AllowAll
   





    AllowOverwrite on
    Umask 022
   
        AllowAll
   




    AllowOverwrite on
    GroupOwner shared
    Umask 007
   
        AllowAll
   




    User public
    Group public
    UserAlias anonymous public
    UserAlias ftp public
    AnonRequirePassword off
    UseFtpUsers on
    MaxClients 10
    DisplayLogin welcome.msg
    DisplayFirstChdir .message
   
        AllowAll
   

   
       
            DenyAll
       

   




    User bugger
    Group bugger
    AnonRequirePassword off
    UseFtpUsers on
    MaxClients 10
    DisplayLogin welcome.msg
    DisplayFirstChdir .message
   
      Order Allow,Deny
      Allow from 127.0.0.1, 192.168.0.0/22
      Deny from all
   

   
       
            DenyAll