Posted by R-H on November 11, 2009 at 2:32am
I'm having a problem with sites/default/files.
I have permissions set to 775.
If I recall I copied this directory from my previous server using the Mac Finder.
Any ideas what's going on?
I'm having a problem with sites/default/files.
I have permissions set to 775.
If I recall I copied this directory from my previous server using the Mac Finder.
Any ideas what's going on?
Comments
Group Permission
So, am I right in assuming that permissions need to be 777 for the files folder in drupal to work? That being said, as I'm starting to get this, I could associate the files directory to the group and then assign 775 permissions so the world can't write to the files directory. How do I figure out what the groups are on my server?
BTW: is there a GUI for managing apache? Anyone tried RApache?
Thanks!
777 assigns universal read
777 assigns universal read write access to a file at all levels. 755 is the normal setting but often when you're moving files on to a server like this that causes problems. 755 gives the owner full access and everyone else read only access. You should try
chown webuser <file>(I'm 98% user it's webuser that's running Apache but I don't have a box up at the moment)What happens is that Apache is running under the webuser user while the files you've created/copied are owned by you (root). With 755 that allows Apache to read the files but nothing else. When you change the ownership you fix this issue. This just scratches the surface, I'd suggest that you do some Googleing to get a better understanding of permissions and file ownership under *nix operating systems.
Doug
@nullvariable | www.nullvariable.com
Not webuser
Thanks. I get the concept. You can pass permissions through to files and directories based on their owner or group. That allow for a greater level of privacy. My question is though what group or owner should files belong to? How would I find out myself. I can see right now if I do a ls -ld on files it returns root root. So I guess that it's group and owner are root right now. Hence the problem.
The group appears to be www-data
Crazy man. I'm learning linux or something. I guess the group is www-data and I was able to change all sub-directories using -R.
So, there must be file or something that lists the owners, users and groups? Where's that?
As much as I love this, does anyone know if there is a GUI to manage linux remotely out there?
Thank you!
to list users on a linux box
to list users on a linux box you could use this command:
cat /etc/passwd | cut -d":" -f1Doug
@nullvariable | www.nullvariable.com
Groups and Owners
Ok, I may have the same issue for the other files I brought over from my other server: modules, themes and libraries.
Can someone please let me know what the correct owner/group/permission should be for these. I'm also noticing an owner/group 1080.
Thanks
there are lots of GUIs for
there are lots of GUIs for linux but you'd never want to run one on a production web server. You'd eliminate all of the speed that we're trying to get and could open it up to tons of vulnerabilities. I would suggest looking for a hosting service that offers management of all these issues instead of looking for a tool that makes it easier. When you get to this level the only tool that makes it easier is knowledge. Any time you introduce a tool that makes this sort of stuff "easier" you often forgo an understanding of why certain things operate the way the operate and you end up selecting the default. At the level of stuff we are using here, the default is usually not the best route. Basically what I'm saying is that this project is about making things easier but we are talking about the difference between learning to drive a semi-truck (with 12-18 gears) or learning to drive a mini-cooper. There are things that you can do to optimize driving the semi-truck but it's still got 18 wheels instead of 4.
All that being said
chown -R www-data <path-to-files>is the command that you need to run and it should make the user account that runs Apache the owner of these files which will then allow it to operate as expected. If you haven't read this Wiki page I'd highly recommend it: http://groups.drupal.org/node/33078
If you really really need some sort of a GUI then you could check out Webmin but again at that point you'd be better off on a simpler, cheaper webhosting platform.
Doug
http://twitter.com/nullvariable | http://www.nullvariable.com
Doug
@nullvariable | www.nullvariable.com
I totally hear you. What
I totally hear you. What about using a remote GUI? Does that really compromise speed or security? Trust me. I'm certainly interested in teaching myself how to drive this ship. Just curious if there is anything out there that might might the task a little easier.
Cheers!
I'm not aware of a GUI for
I'm not aware of a GUI for anything other than MySQL that you could run remotely. WinSCP might be helpful, it turns SSH into a more Windows Explorer like experience. Other than those two I don't think there are any other tools that do what you're asking for.
Doug
@nullvariable | www.nullvariable.com
GUI and performance
I've taken to heart you comment about adding additional GUIs onto Mercury and have been able to perform most functions via the command line. Just wondering how much a tool like Webmin would decrease performance. Any thoughts.
I did find a Mac desktop tool call Navicat to manage the DB. There's a PC version too. I imagine that a remote client like that wouldn't impact performance. Correct?
no a remote client (unless is
no a remote client (unless is makes tons of requests or other strange things that tie up database resources) won't have any extra overhead on the server. If you're just doing simple stuff and don't have a high traffic site Webmin won't be noticeable as far as overhead. The other problem with adding additional ways to access a server like this is that it can open up different ways for the server to be compromised. It's one more application you have to make sure is patched and up-to-date.
I would suggest setting up Webmin on a machine at home and testing it out to see if it makes sense and really helps you do what you need to get done. As a general rule something like Webmin isn't going to add overhead to a system like this since it's webbased. It will only have overhead on the box if you're actually using it. I don't think I'd ever use it on a production machine since it adds too many other ways that someone could break into the machine.
Doug
@nullvariable | www.nullvariable.com
SeLinux permission problems
If you're running SeLinux (enabled by default on Fedora and others) and run into mysterious permission issues, especially after assorted file system operations, you may be having context problems. The magic command to fix them is:
restorecon -rv /var/www/html
good commmand!
good commmand!