Understanding permissions


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Understanding permissions
Prev   Next
# 1  
Old 12-12-2011
Understanding permissions

Hi,

I just installed wordpress on localhost, and I have some issues with permissions here. I recently switched to linux, so I'm still learning things.

While I'm installing linux, I can't ( that is wordpress can't ) make file wp-config.php in directory I want to install it /var/www/wordpress

when I do something like this:
Code:
chmod 777 /var/www/wordpress

, everything is fine and I can create file and install wordpress.

Than, I want to install new theme, plugin or make updates. Whenever I try to do this, again I need to change permissions, because I get something like this

Image

than i get back to terminal and type this:
Code:
chown -R www-data:www-data /var/www/wordpress

(someone recommended me this command, I don't what actually does, but it lets me proceed with installation ) . I click Proceed button and theme,plugin,update install easily.

Than, as I'm developing wordpress themes, I need to change file inside /var/www/wordpress/wp-content/themes/themename/header.php, and than I can't write to this file.
Than I type this in terminal:
Code:
chown my_username /var/www/wordpress/wp-content/themes/themename/header.php

and now everything is fine and I can write to file.


Can anyone explain me nicely what I'm doing, and why I'm doing this? It's not about that I make everything work, I want to understand the process here.

I will be very grateful for your help,
regards
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Understanding $PATH better

Dear all, I have a script which triggers a C program in it after initialising parameters. Below is the sample #! /bin/sh . /my_data/environment HOME=/home/execs/testing/ cd $HOME compare $1 $2 X exit $? (10 Replies)
Discussion started by: PikK45
10 Replies

2. Shell Programming and Scripting

Need your help in understanding this

Hi, I found this in a script and I would like to know how this works Code is here: # var1=PART1_PART2 # var2=${var1##*_} # echo $var2 PART2 I'm wondering how ##* makes the Shell to understand to pick up the last value from the given. (2 Replies)
Discussion started by: sathyaonnuix
2 Replies

3. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

4. UNIX for Dummies Questions & Answers

Understanding Groups

Hi cat /etc/group : .... oinstall:x:401: dba:x:400:oracle ... cat /etc/passwd|grep oracle oracle:x:130:401::/home/oracle:/bin/ksh 1. Is that mean that : ORACLE user has OINSTALL as it Primary group and DBA as secondary group ? 2. What is the linux comman to set ORACLE user with... (2 Replies)
Discussion started by: yoavbe
2 Replies

5. UNIX for Dummies Questions & Answers

understanding {%/*}/

Hi Gurus: I am trying to understand the following line of code.I did enough of googling to understand but no luck.Please help me understand the follow chunk of code: X=$0 MOD=${X%/*}/env.ksh X is the current script from which I am trying to execute. Say if X=test.ksh $MOD is echoing :... (3 Replies)
Discussion started by: vemana
3 Replies

6. Shell Programming and Scripting

need help understanding mv

I just started shell coding and I'm a bit confused on how 'mv' works can someone explain to me how it works and if i did this correctly. Thanks. echo "Enter Name of the first file:" read file1 #echo $file1 if ; then echo "Sorry, file does not exist." exit 1 ... (16 Replies)
Discussion started by: taiL
16 Replies

7. Shell Programming and Scripting

Understanding ${parameter}

I was reading Bash Cookbook and it had a line of command that assigned a value from var2 to var1 if var1 was empty. Someone told me I could do the same with ${parameter}. I'm just trying to understand this. Would the following be correct? For: answer= default=1Should I assume that the two... (1 Reply)
Discussion started by: victorbrca
1 Replies

8. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

9. Linux

A little help understanding FIFOs?

This isn't strictly a Linux question, but... I've been working on a project to archive some streaming media for time shifting using 'mplayer' and have been using FIFOs to archive in Ogg Vorbis format: mkfifo program_name.wav (mplayer -ao pcm -aofile program_name.wav &)... (0 Replies)
Discussion started by: deckard
0 Replies
Login or Register to Ask a Question