LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-23-2010, 03:16 PM   #1
sfrederiksen
LQ Newbie
 
Registered: Jan 2010
Posts: 10

Rep: Reputation: 0
need to manually update premissions apache


Hi
I have a directory in the /var/www folder. I have access to this directory from my windows machine through samba.

Everytime i add new files to the folder where the webpage is locate i need to go to my centos server a type chmod -R 777 /var/www/name

It can't be right that i need to do this everytime i add new files to the folder??

If i dont run this command i can't access this files when I access the webpage throug a browser...

Any suggetions?

UPDATE: I think It has something to do with the samba user, because if i create the files as root directly on the centos server i dont got the problem ... ?

Regards
Steffen

Last edited by sfrederiksen; 01-23-2010 at 03:18 PM.
 
Old 01-23-2010, 03:24 PM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
I am not sure on the fix,

The problem will be due to the apache user not being able to access the file due to permissions. Anyways it sounds like you are connecting directly into a branch of the root document for apache and that sounds potentially dangerous.
 
Old 01-23-2010, 03:29 PM   #3
sfrederiksen
LQ Newbie
 
Registered: Jan 2010
Posts: 10

Original Poster
Rep: Reputation: 0
its a directory locate in /var/www that i have local access to thorugh samba on my windows machine. Be when i but files in this web directory i have to run the comman chmod -R /var/www/name

This in only a problem when the files is uploaded to the directory throug samba... as said before..
 
Old 01-23-2010, 04:02 PM   #4
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
I think enforcing the ownership might be a possible solution...

If you enforced a security mask of 770 and placed apache and the samba user within the same group I believe this would fix the issue you are experiencing.

I don't know samba that well myself so I can't really give any more advice then that.

Last edited by r3sistance; 01-23-2010 at 04:03 PM.
 
Old 01-25-2010, 05:38 PM   #5
Mark of a 1000 Truths
LQ Newbie
 
Registered: Jan 2010
Location: United Kingdom
Distribution: Ubuntu
Posts: 3

Rep: Reputation: 1
file permission problems

i'm currently trying to install batavi as an ecommerce solution
i tried the below and
Quote:
Originally Posted by r3sistance View Post
I think enforcing the ownership might be a possible solution...

If you enforced a security mask of 770 and placed apache and the samba user within the same group I believe this would fix the issue you are experiencing.

I don't know samba that well myself so I can't really give any more advice then that.
it gave apache access to var/www then said testing directory, when i got bored of waiting i refreshed and it said don't have permission.

So what could i be doing wrong.
 
Old 01-26-2010, 04:35 AM   #6
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 651

Rep: Reputation: 34
Hi you can set create mask = 0777 on your samba config file per share. This will cause all the files you copy using samba to be created with the permission 777.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
slackpkg : How do I update manually? pokipoki08 Slackware 2 08-09-2009 12:24 PM
Manually Update Linux OS pryone Linux - Newbie 2 01-17-2009 03:15 AM
RHEL 4 RPMs update manually ia64processor Red Hat 0 02-10-2006 09:49 AM
How do I update the kernel manually? christian_delaf Red Hat 1 02-09-2005 06:00 PM
update redhat 8.0 rpm packets manually? maxut Red Hat 3 03-19-2004 04:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:01 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