Forum Support

Shape 5
March 29, 2024, 07:10:06 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: A holy theme about "acces rights" of Joomla's files/directories  (Read 1927 times)
estaf
Jr. Member
**
Offline Offline

Posts: 25



« on: February 20, 2017, 03:17:13 PM »

How many times I study that theme, that many times I watch different minds about it.
There is the 100% of 100, that this theme come up. Touch me please to that one, because I can't found it and all doing so:
before editing certain ones/installing some packs/uploading some files etc:
chown -R $site:web-developers /home/ftp/$site
chmod -R 777 /var/www/$site

after it:
find /var/www/$site -type d -print0 | xargs -0 chmod 0755
find /var/www/$site -type f -print0 | xargs -0 chmod 0644

I know, that it's not right way. one size fits all, but I can't found a good way. Somebody (other internet resources) give the advice, that I must allow all, or allow all for tmp, cache directory etc.
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #1 on: February 21, 2017, 08:09:44 AM »

Hello,

I'm sorry I am not sure what you are asking. 644 for files and 755 for folders is the typical setup on most servers. If you can't write with those settings then there is an ownership problem on your server and you need to contact your hosting provider.
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
estaf
Jr. Member
**
Offline Offline

Posts: 25



« Reply #2 on: February 21, 2017, 05:54:07 PM »

Thank you, mikek
I'm and "hosting provider" and "owner"  Smiley
Joomla stands on my home server for tests.
The owner is ftp user, who works with a joomla directory /var/www/$site
It's my mistake.
I had decide to watch all again. I'd like to write in that topic all my changes on server,  to find mistake, that I had make. I forgot to add apache user to group, that use ftp user

vsftpd, apache, php, mysql stand on ubuntu server 14.04.03 lts.
How I had create all this one (maybe, I did something not right):
1.
Code:
sudo echo "/usr/sbin/nologin" >> /etc/shells
2. Create two groups. web-users - for users. and web-developers - for developers.
Code:
sudo addgroup web-users && sudo addgroup web-developers
3. The moment, that I had forgot to do.
Code:
sudo usermod -a -G web-users www-data && sudo usermod -a -G web-developers www-data
4. Create catalogs for that users (in /home directory)
Code:
sudo mkdir /home/web-developers && sudo mkdir /home/web-users
5. set alias
Code:
site=anteng
6. create catalog in ftp directory for user
Code:
sudo mkdir /home/ftp/$site
7. create user for project + temporary pass as 111.
Code:
sudo useradd $site -g web-developers -p 111 -d /home/ftp/$site -s /usr/sbin/nologin
8. mkdir directory for user
Code:
sudo mkdir -p /home/ftp/$site/$site
9.  set owner for directory
Code:
sudo chown $site:web-developers /home/ftp/$site
10. set ftp password for user
Code:
sudo passwd $site
11. create directory for apache location.
Code:
sudo mkdir /var/www/$site
12. Add mount point to /etc/fstab + mounting point
Code:
sudo echo "/home/ftp/anteng/anteng /var/www/anteng none    bind    0    0" >> /etc/fstab
sudo mount -a
13. owner+permissions
Code:
sudo chown -R $site:web-developers /var/www/$site
find /var/www/$site -type d -print0 | xargs -0 chmod 0755
find /var/www/$site -type f -print0 | xargs -0 chmod 0644
14 testing ftp
Code:
test to the writing, reading etc files/directories. uploading empty configuration.php to $site
Code:
exit
15. add a joomla three to ftp $site directory
16. Install joomla from internet browser.
all're ok
A moment was solved.
« Last Edit: February 21, 2017, 06:11:11 PM by estaf » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.