DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 14th November 2020
openletter openletter is offline
Real Name: Paul
New OpenBSD User
 
Join Date: Feb 2020
Posts: 23
Default Permissions and ownership in /var/www/

I am looking at permissions and ownership in /var/www/ and I'm finding that the defaults in OpenBSD are somewhat non-user friendly as compared to what I used for myself in Linux.

The differences are primarily that:

user:group is root:daemon
Directory permissions are 755
File permissions are 644

These mean that almost anything I want to do must be with root privilege with either doas or root session.

In Linux, I would set ownership so that either my user was the owner or my user was a member of the group (e.g., webdevs) and permissions so that directories were 775 and files were 664. Of course, there are some cases where user or group have to be slightly different, but for the most part I could easily edit most files.

Also, by having my user able to edit most files, the occasional file that can really break things I may set as root so I'm just bit more aware of what I'm editing.

The only reason I can think of to have all permissions requiring root privileges is that if my account is somehow compromised, an attacker could not make edits to public facing files.

So I want to make things more convenient for editing purposes without having to run as root or enter doas 1000+ times consecutively. What might be a good option, and am I missing something here?
Reply With Quote
  #2   (View Single Post)  
Old 19th November 2020
victorvas victorvas is offline
Real Name: Victor
Linux
 
Join Date: May 2019
Posts: 148
Default

Isn't httpd chroot itself in the /var/www/? What if you create your site in /var/www/sitename and change ownership inside that directory?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba permissions epitaxial OpenBSD Packages and Ports 3 1st March 2015 06:12 PM
Permissions error J05HYYY NetBSD Package System (pkgsrc) 1 7th October 2009 11:05 PM
Permissions for zzz / acpiconf Mantazz FreeBSD General 0 15th September 2009 10:43 PM
permissions and FTP/HTTP Yuka FreeBSD General 0 20th October 2008 10:32 PM


All times are GMT. The time now is 12:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick