Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
[Solved] Correct file & folder permissions?
snuffy #1
Member since Jan 2018 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: [Solved] Correct file & folder permissions?
I have migrated from a windows to a Linux server and now don't think my permissions are correct. I created a tar.gz on Windows of my 'data' dir and unzipped it over the top of an existing new install:

sudo tar xvzf /share/data.tar.gz -C /var/www/dokuwiki-2018-04-22a/

I then did:

sudo chown -R www-data:www-data data

I can create and edit pages, as well as see all my old pages, but not sure what the directories and files permissions should be. I have read https://www.dokuwiki.org/install:permissions but don't fully understand it. Different forum posts and how-to guides all seem to set different permissions!

I can use chmod and chown but am not a Linux expert, and some of the permissions concepts are lost on me.

Should the 'data' dir and all its contents be owned by the www-data user and only that user should have read, write, and execute? Do users of the site, i.e. users on the web need to have read access? or should it be -rwx------ for files and drwx------ for directories ?

Do I need to set dmod and fmod to the same permissions?

Thanks.
This post was edited 2 times, last on 2018-11-25, 19:08 by snuffy.
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4446 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
The imoprtant permissions needed are for the web server:  so the web server should be the owner of the wiki, its files and directories, and have read/write permission for files and read/write/execute for directories.  Users do not need write permission.  The -x field does not apply to ordinary pages in the data directory.  It is the execute bit and applies only to scripts and programs that are meant to run independently..
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
This post was edited on 2018-11-25, 17:22 by turnermm.
snuffy #3
Member since Jan 2018 · 6 posts
Group memberships: Members
Show profile · Link to this post
Thanks, I've learnt a little bit more here. Have set permissions as read write and execute for both owner and group... didn't know how to set it just for files. It all appears to be working as expected so far.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-01-17, 20:24:56 (UTC +01:00)