How to assign correct permissions to both webserver and svn users?

732

There is also a group called www-data. The files you have in your webroot should all belong to that group and have write-right for the group. Assuming your webroot is /var/www you can do this by executing (as root or by using sudo)

chgrp -R www-data /var/www
chmod -R g+rwX /var/www
Share:
732

Related videos on Youtube

Samurai Ken
Author by

Samurai Ken

Updated on September 17, 2022

Comments

  • Samurai Ken
    Samurai Ken over 1 year

    For various reasons I have clean installed my dev box and it is running Win7 x64 and currently has VS2010 installed. I am maintaining several projects that require the use of the 1.5 CTP2 release services, under .net 3.5 (obviously). I have already taken the steps needed to install the full 1.5 CTP2 under Win7.

    While I understand that the wizard style tooling that normally runs in VS2008 is not available (at least, I think it isn't?) I am hoping that temporarily I can get by with using the command line tools to tide me over till then so I don't need to keep round tripping into the VS2008 VM I keep handy.

    I need to do the normal things...

    • Create a service and the web.config entries to enable it

    • Create or update a service reference in a Silverlight project

    • Create or update a service reference in a WPF project

    Again, command line is OK - I obviously don't need to do this very often.

    Thanks!

    Ken

  • Samurai Ken
    Samurai Ken over 14 years
    As I am looking for answers regarding VS2010 - do you think the similar workaround (with the right path) would work? Thanks!
  • Samurai Ken
    Samurai Ken over 14 years
    Ok, my bug was unrelated. Turns out that the ADO.NET services dont like entities that use the "Date" type in SQL Server 2008 :( Anyway, Vitek's answer is correct, and you ALSO of course need to use Shawn Wildermuth's awesome workaround.
  • Shawn Wildermuth
    Shawn Wildermuth over 14 years
    No way to do 1.5 in 2010. By the end of January a WDS 2.0 SL client library will be available. I'd suggest waiting.
  • aneuryzm
    aneuryzm over 13 years
    It seems that the changing the grp is not the solution. It depends on the owner. If the owner is www-data than I cannot commit such files, if the owner is svnuser than I cannot upload files into the folders with php.
  • aneuryzm
    aneuryzm over 13 years
    Should I maybe create a group and add both users ? Is this the best solution ?
  • Carsten Thiel
    Carsten Thiel over 13 years
    The user www-data is automatically a member of the group www-data. You could add the svnuser to that group as well. But if the group has write-permission on the directory (and its subdirectories) the www-data user should be able to upload files to that directory.
  • aneuryzm
    aneuryzm over 13 years
    I've added svnuser to www-data and the www-data group has all permissions over files, but still it gives me an error. The svnuser is actually my Ubuntu username, so probably svn doesn't use the group instead.
  • aneuryzm
    aneuryzm over 13 years
    I've also tried to change owner to svn-data, but then the webserver cannot upload files. This is strange, because the files still are under www-data group which has all permissions (775)