LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-21-2016, 11:49 PM   #1
tommytx
LQ Newbie
 
Registered: Nov 2016
Posts: 1

Rep: Reputation: Disabled
Running Chown on my linux server now I am locked out.


In an attempt to correct ownership on some of my directories I did the following thing..
chown retspro:retspro public_html and all seemed well but when i tried to get into my site it says not authorized.. can anyone tell me what ownership i changed that I should not have..
I did match it up with the ownership of another working site on teh same server (that did not get the ownership change) and they seem similar..
All files and directories that I checked did have retspro as owner and user.. but now I cannot access the site.

I can get onto cpanel and ftp is fine and i did look for an htacess file blockign me to no avail.. plus it did not have an htaccess so why should it have one now..
 
Old 11-22-2016, 11:02 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
First question was everything working before you run chown?
If it was then why did you change it?
 
Old 11-22-2016, 11:23 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Member Response

You said "directories", therefore my guess is that public_html is a directory?

Be aware of a couple of things. First there are files in that directory and they were not affected by your chown command. In order to do this you should use the -R argument to recurse down directories and change the ownership of all the contained files. Next, you say you have a parallel site where you wished to match the ownership. Get a long listing of the directories and files and examine all the attributes of ownership, group membership, and privileges. You may need to also perform a chmod command to adjust privileges. You may have assumed that the username matches the group, and this may be an incorrect assumption. The long listing command is:
Code:
ls -l
 
1 members found this post helpful.
Old 11-22-2016, 12:00 PM   #4
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
For a website to be accessible to people on the Internet, the web directory must be readable by 'others'.

Can you verify that you public_html directory has permissions like: rwxrwxr-- (sometimes written as 774). The important one is the final triad: `r--` meaning that other people (not the user retspro, and not the group retspro, but other people visiting your site from the outside world) have read permissions.
 
Old 11-26-2016, 04:31 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
https://www.linuxquestions.org/quest...me-4175594127/
maybe helpful?
 
Old 11-28-2016, 08:26 PM   #6
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 417

Rep: Reputation: 74
Quote:
Originally Posted by notKlaatu View Post
For a website to be accessible to people on the Internet, the web directory must be readable by 'others'.

Can you verify that you public_html directory has permissions like: rwxrwxr-- (sometimes written as 774). The important one is the final triad: `r--` meaning that other people (not the user retspro, and not the group retspro, but other people visiting your site from the outside world) have read permissions.
I beg to differ. It must be readable by httpd instead, no need to provide 'o' readability.

Last edited by c0wb0y; 11-28-2016 at 08:29 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP5 - chown() - Warning: chown(): Operation not permitted pizzipie Programming 11 09-10-2013 03:53 AM
rpc.statd: Running as root. chown /var/lib/nfs to choose different user catkin Slackware 11 01-10-2013 08:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:33 PM.

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