LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2016, 07:48 AM   #1
sorintene
LQ Newbie
 
Registered: Aug 2008
Posts: 15

Rep: Reputation: 0
owner can not read its own created file


Hello,
I am in front of a strange situation. I have done a postgresql db backup. Than I try to move it on another place. See below what where the commands and terminal replies:

postgres@aelserver:~> pg_dump ael5 > ael5.backup
mv: cannot open `ael5.backup' for reading: Permission denied
postgres@aelserver:~> su - mv ael5.backup /AELServer/Backup/principal/ael5.backup
mv: cannot open `ael5.backup' for reading: Permission denied
postgres@aelserver:~> sudo mv ael5.backup /AELServer/Backup/principal/ael5.backup
mv: cannot open `ael5.backup' for reading: Permission denied
postgres@aelserver:~> ls -al
total 12750092
drwxr-x--- 5 postgres postgres 304 Apr 6 01:56 .
drwxr-xr-x 20 root root 552 Apr 5 04:16 ..
-rw------- 1 postgres postgres 240 Apr 5 03:40 .bash_history
-rw-r----- 1 postgres postgres 192 Jul 1 2004 .bash_profile
drwxr-xr-x 2 postgres postgres 120 Apr 6 01:36 .mc
-rw------- 1 postgres postgres 116 Feb 25 16:00 .psql_history
-rw-r--r-- 1 postgres postgres 13043336477 Apr 6 02:42 ael5.backup
drwx------ 2 postgres postgres 48 Jul 1 2004 backups
drwx------ 2 postgres postgres 48 Jul 1 2004 data
-rw-r--r-- 1 postgres postgres 1198 Sep 18 2006 initlog
-rw-r--r-- 1 postgres postgres 0 Apr 6 01:55 sorin.log
postgres@aelserver:~>

So, as you see, not even root has read access to ael5.backup file.
For info: Suse Linux Enterprise 9 with Postgresql server 7.4.2

Thanks in advance for suggestions !
 
Old 04-06-2016, 08:55 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Post the unedited console output, and try not to copy the color codes this time.
 
Old 04-06-2016, 08:56 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
what are the permissons on this file?
Code:
ael5.backup
ps, use code blocks tags code /code in [ ] HTML is basic knowleadge for them that know it.

Last edited by BW-userx; 04-06-2016 at 09:01 AM.
 
Old 04-07-2016, 02:31 AM   #4
sorintene
LQ Newbie
 
Registered: Aug 2008
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by BW-userx View Post
what are the permissons on this file?
Code:
ael5.backup
ps, use code blocks tags code /code in [ ] HTML is basic knowleadge for them that know it.
rw-r--r--
You can see it in my first post.
 
Old 04-07-2016, 02:33 AM   #5
sorintene
LQ Newbie
 
Registered: Aug 2008
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AlucardZero View Post
Post the unedited console output, and try not to copy the color codes this time.
I used script command to capture console in/out in a file. I do not know how to "Post the unedited console output......."
 
Old 04-07-2016, 06:52 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by sorintene View Post
I used script command to capture console in/out in a file. I do not know how to "Post the unedited console output......."
are you not using a terminal that you can drag over it with your mouse then right click copy, then paste it into code blocks?

keyboard usage: Shift+Ctrl + c (copy) Shift + Ctrl + V (paste)
bonus command:
Middle button mouse: highlight text then click the middle button: It pastes the contents at the prompt area.
 
Old 04-07-2016, 05:46 PM   #7
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by sorintene View Post
I used script command to capture console in/out in a file. I do not know how to "Post the unedited console output......."
You appear to have edited for posting here the output of the commands you ran, because these do not make any sense whatsoever:

Code:
postgres@aelserver:~> pg_dump ael5 > ael5.backup
mv: cannot open `ael5.backup' for reading: Permission denied
postgres@aelserver:~> su - mv ael5.backup /AELServer/Backup/principal/ael5.backup
mv: cannot open `ael5.backup' for reading: Permission denied
Copy and paste what you did and what happened when you did, and don't change anything.

Last edited by AlucardZero; 04-07-2016 at 05:48 PM.
 
Old 04-08-2016, 02:10 AM   #8
sorintene
LQ Newbie
 
Registered: Aug 2008
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by BW-userx View Post
are you not using a terminal that you can drag over it with your mouse then right click copy, then paste it into code blocks?

keyboard usage: Shift+Ctrl + c (copy) Shift + Ctrl + V (paste)
bonus command:
Middle button mouse: highlight text then click the middle button: It pastes the contents at the prompt area.
Thanks for info! I login to forum from a Windows PC. The file I posted was from the Linux PC saved with script an yes, I've edited a bit to look friendly -
 
Old 04-08-2016, 04:08 PM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
you took out the wrong stuff and you're welcome
 
  


Reply

Tags
permission denied, postgresql



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
change of owner and group owner of a file belongs to diff user ? somorg Linux - Newbie 3 06-14-2015 09:11 AM
change of owner and group owner of a file belongs to diff user ? somorg Linux - Security 2 06-13-2015 02:33 AM
change of owner and group owner of a file belongs to diff user ? somorg Linux - General 2 06-12-2015 10:40 AM
How to mark file as read-only when not owner of file tqz Linux - Newbie 8 03-25-2014 09:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:02 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