LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-11-2015, 01:40 PM   #1
planarian
Member
 
Registered: Jun 2011
Posts: 33

Rep: Reputation: Disabled
PostgreSQL permission issue on Mint 17


I'm in the process of installing PostgreSQL. Per the instructions on Ubuntu's site, I ran

Code:
sudo apt-get install postgresql postgresql-contrib
sudo apt-get install pgadmin3
sudo -u postgres psql postgres
and encountered the following error

Code:
could not change directory to "/home/jay": Permission denied
I know enough about Linux to pause before attempting to change file/directory permissions for something like this. What should be my next step?

Thanks!
 
Old 01-11-2015, 07:14 PM   #2
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
I've set up PostgreSQL many times, but never using Ubuntu packages. Nevertheless, reading the instructions you linked to and the error message you get, I have a suggestion. Try changing directory to /tmp and then run the "sudo -u postgres..." command. (I think the error is because the postgres user cannot access the directory you were in when you issued the command.)
 
1 members found this post helpful.
Old 01-11-2015, 07:58 PM   #3
planarian
Member
 
Registered: Jun 2011
Posts: 33

Original Poster
Rep: Reputation: Disabled
Yep, when I run it outside my home directory, it works. I don't yet have enough experience with Postgres to know whether the lack of access to that directory will be a problem, but this at least allows me to setup a password. Thanks!
 
Old 01-11-2015, 08:50 PM   #4
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
No, the 'postgres' user should not have access to your home directory. And no user except postgres (and root) should ever have access to the files where the database data is stored (which are owned by the postgres user).
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PostgreSQL /PHP issue RRT Linux - Server 5 10-18-2014 02:55 AM
permission's issue bibiki Linux - Desktop 1 05-06-2011 11:10 AM
Permission issue linson_85 Linux - General 3 10-24-2010 09:30 AM
Permission issue??? ThunderStrick Linux - Newbie 4 07-06-2009 11:41 PM
issue with permission santasballz Linux - Newbie 7 02-28-2004 11:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration