DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th March 2020
CiotBSD CiotBSD is offline
c107:b5d::
 
Join Date: Jun 2019
Location: Under /
Posts: 175
Default [6.6] postgresql .lock: Permission denied

Hi,

Today I install postgresql server on OpenBSD 6.6 server.

Into file postgresql.conf, I set socket_unix_directories, as:
Code:
unix_socket_directories = '/var/www/tmp/postgresql, /tmp'
But, the server deny to start!
Quote:
2020-03-04 14:02:04.169 CET [50162] LOG: listening on IPv4 address "127.0.0.1", port 5432
2020-03-04 14:02:04.169 CET [50162] LOG: listening on IPv6 address "::1", port 5432
2020-03-04 14:02:04.170 CET [50162] FATAL: could not open lock file "/var/www/tmp/postgresql/.s.PGSQL.5432.lock": Permission denied
2020-03-04 14:02:04.170 CET [50162] LOG: database system is shut down
The rights on FS are:
Code:
# ls -al /var/www/ | grep tmp                                                                                                                                                         
drwx-----T   3 www   www     512 Mar  4 01:00 tmp/

# ls -al /var/www/tmp         
total 12
drwx-----T   3 www          www     512 Mar  4 01:00 ./
drwxr-xr-x  13 root         daemon  512 Mar  4 00:35 ../
drwxr-xr-x   2 _postgresql  www     512 Mar  4 01:00 postgresql/
One idea/suggestion?!
__________________
GPG:Fingerprint ed25519 : 072A 4DA2 8AFD 868D 74CF 9EA2 B85E 9ADA C377 5E8E
GPG:Fingerprint rsa4096 : 4E0D 4AF7 77F5 0FAE A35D 5B62 D0FF 7361 59BF 1733
Reply With Quote
  #2   (View Single Post)  
Old 4th March 2020
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 408
Default

Could be a user's permissions issue.
Have you tried to start the server as root ? if not, it's worth to try...
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry
ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD
Reply With Quote
  #3   (View Single Post)  
Old 4th March 2020
CiotBSD CiotBSD is offline
c107:b5d::
 
Join Date: Jun 2019
Location: Under /
Posts: 175
Default

After inform me about sticky bit, I chmod /var/www/tmp to 1705; and the service postgresql starts correctly!

But, why by defaut, folders cache and tmp are rights to minimalist 1700???
__________________
GPG:Fingerprint ed25519 : 072A 4DA2 8AFD 868D 74CF 9EA2 B85E 9ADA C377 5E8E
GPG:Fingerprint rsa4096 : 4E0D 4AF7 77F5 0FAE A35D 5B62 D0FF 7361 59BF 1733
Reply With Quote
  #4   (View Single Post)  
Old 4th March 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Quote:
Originally Posted by CiotBSD View Post
...by defaut, folders cache and tmp are rights to minimalist 1700???
The /var/www/tmp directory does not exist by default and is not created by the postgresql-server package -- it is not in the port's PLIST.

You might have created this directory with mkdir(1)?
Reply With Quote
  #5   (View Single Post)  
Old 4th March 2020
CiotBSD CiotBSD is offline
c107:b5d::
 
Join Date: Jun 2019
Location: Under /
Posts: 175
Default

no. I think when I installed pkg php-7.3, no?!
__________________
GPG:Fingerprint ed25519 : 072A 4DA2 8AFD 868D 74CF 9EA2 B85E 9ADA C377 5E8E
GPG:Fingerprint rsa4096 : 4E0D 4AF7 77F5 0FAE A35D 5B62 D0FF 7361 59BF 1733
Reply With Quote
  #6   (View Single Post)  
Old 4th March 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Good catch! That PLIST contains:
Code:
@sample ${CHROOT_DIR}/tmp/
Perhaps you could discuss adding an @exec-add to the PLISTs with Stuart Henderson, the PHP maintainer. Testing and then attaching a unified diff(1) applied to /usr/ports/lang/php/{7.2,7.3}/pkg/PLIST-main in your Email would permit him to review your recommendation, and if approved, easily commit your patch.

Stuart's Email can be obtained with $ pkg_info php--, note the two dash characters.

Last edited by jggimi; 4th March 2020 at 10:18 PM. Reason: added a way to get sthen@'s Email address
Reply With Quote
Reply

Tags
denied, openbsd, permission, postgresql

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
Permission denied on OpenBSD 6.1 notooth OpenBSD Security 5 18th May 2017 09:15 PM
Commit to pkgsrc-wip - Permission denied darktrym NetBSD Package System (pkgsrc) 1 5th June 2016 08:45 PM
sendmail, mqueue : permission denied wesley General software and network 1 20th January 2011 02:30 PM
Permission denied (publickey). Help pls rex FreeBSD General 13 14th October 2008 08:54 PM
Permission denied delboy FreeBSD Ports and Packages 11 24th May 2008 09:26 PM


All times are GMT. The time now is 09:42 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