Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I just switched my site's server from Windows to Linux, and am finally able to control file permissions from my ftp. So, seeing that all permissions were 705 by default (and not wanting just anyone to have permission to execute), I went and changed everything to 744.

Now, gif and jpg links don't work, pdf download links don't work, php links don't load, and mov files don't play. Conversely, all html files work perfectly. Setting things back doesn't seem to help. Even setting to 777 gets me nowhere.

Any ideas on what might be going wrong? I've been googling file permissions all day (solved that problem with the Windows-Linux switch, which has bred a new problem), and I don't think anything I can find has escaped my attention.

The site: absis-minas.com

Go easy on a n00b. I took up learning php out of interest, and wound up delving into server management issues due to a very simple line of code not working the way it was supposed to.

Thanks!

share|improve this question
    
Just out of curiosity, what file permissions issues were you having on Windows that you solved by moving to Linux?? –  GregD Jan 3 '11 at 13:32
    
Under Windows, I was unable to change file permissions. I could log into my hosting account and switch them there, but those changes weren't recognized by FileZilla or Dreamweaver. I have absolutely no idea why. Now that I've switched to Linux, R, W, and X are all present. Seeing that they by default gave X permissions to the public, I changed everything to 744. –  Absis Minas Jan 3 '11 at 13:37

3 Answers 3

up vote 3 down vote accepted

If you set everything to 777 then right off the bat, you know that something else is up.

That being said, standard permissions for your files and folders should be : - for folders : rwxr-xr-x (755) - for most files rwr--r-- (644)

In your case, since you've just migrated your site over to a new server, you'll want to verify your web server configurations and folder paths. Specifically, your web browser ought to be able to execute your php files. If suexec is used, then file ownership should be investigated as well .. log files /var/log/apache2/error.log or the like as well as the suexec log will provide information.

Since you're moving from Windows to Linux, you may also want to ensure that all of your paths work and are referred to in the same case ... I'd also go through your index page and verify whether all the paths actually exist ... for instance, this gives a 404 / not found : Further

share|improve this answer
    
This place is so unbelievably troll-free. Thank you. Question, though: why should group and public be able to execute folders? –  Absis Minas Jan 3 '11 at 13:43
1  
On a folder, the execute bit allows you to "enter". –  delerious010 Jan 3 '11 at 13:49
    
Your suggestion worked. –  Absis Minas Jan 3 '11 at 13:51
    
Just one thought... having the world able to enter you directories is not a good approach as well. Be really careful giving access to everybody. –  tmow Jan 3 '11 at 13:52
    
Ooh - my directories aren't that open with a 755, are they? –  Absis Minas Jan 3 '11 at 13:56

http://permissions-calculator.org/ try above link to understand :)

share|improve this answer

I agree with Delerious, but could be also a owner issue.

Probably from the root till the directory where you have stored the images, php and movies, there are one or more directory that are not accessible by the user the run apche (is an apache?).

So check carefully all the path, then in your PHP scripts or HTML files you could have some old MSDOS like path (\PATH\TO\image.jpg) and finally I'd check apache and PHP setup to be sure everything works fine.

Look at the log files!!! You can provide us some logs, so that we can help you better.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.