drupal 6 error ...

Events happening in the community are now at Drupal community events on www.drupal.org.
justaman's picture

Hi mike! Hi people!

I just started developing a site with quickstart.

mysql dumped the DB, created a tar.gz and moved to my Hostgator server...

permission denied. Seems that the .htaccess doesn't had proper permissions, FIXED!

then, the code is working, the DB is working but none of the themes do. Not even the core themes work...

any idea?

I've replaced the .htaccess with one of my working sites, without results. When I inspect with firebug, it says there is no CSS.

should it be some difference between hostgator server's config and quickstart?

adventurecr.negociosticos.com

Comments

Try using windows as "intermediary"

jedihe's picture

Hi justaman,

I've been having the same kind of problems. I haven't tested it, but I think if you decompress the folder on a windows OS, then recompress it and take it to the productionn Linux server things will work as expected.

The reason I propose that is I never had a problem when exporting my sites from wamp. It must be an issue with file system permissions.

partially agree

justaman's picture

I think you are right, it is all about permissions. But don't take it wrong: the permissions are there for a reason. By going W$ and back, you are just grating permissions to all your files, which is a tremendous security hole.

I've copied the core templates from another non quickstart site. It works a little better. But there are still issues, for example the admin menu is all on the bottom of the page...

I think it's clear it's a permissions issue, I could start changing permissions and my templates would be fixed, but instead fixing the qc behavior is a better way to contribute.

So my issue is:

created qc site: great
moved to hostgator server: failed! the themes (maybe other sections) doesn't have the right permissions.

update: I moved my backups back to the quickstart , and didn't worked. That means something failed on the migration process. I will try again at night.

Insultar en Internet es como correr autos en calle publica: Aunque ganes, sigues siendo un idiota.

I think it depends on hosting configuration

jedihe's picture

I have to check if it there is a security hole by using the pass-through Windows, though I believe a properly configured cPanel (the one provided by hostgator) should apply some sane defaults when getting files from a file system not implementing permissions (FAT, Win XP NTFS); also, uploading by FTP should do something similar.

Just thoughts...

Securing file permissions and ownership

justaman's picture

http://drupal.org/node/244924
* Audience: Site administrators
* Last modified: January 21, 2011

you are right. cpanel or ftp can set predetermined permissions. It will be

A) everything closed
B) everything open

but I don't believe a standard FTP tool will set permissions properly for Drupal. "almost" is not enough.

That gives me another reason for not working on windows. Security holes.

Insultar en Internet es como correr autos en calle publica: Aunque ganes, sigues siendo un idiota.

Thanks for the detailed follow-up

jedihe's picture

Thanks for the detailed follow-up; I'll take some time to read the documentation page to understand it better.

Just check the permissions on

rosk0's picture

Just check the permissions on files

File permissions

MichaelCole's picture

Hi, I haven't found the holy grail of fixing file permissions for Drupal yet. This is my current strategy that seems to work for me.

If anyone has improvements, I'm open to suggestions:

# own everything by quickstart user and apache group.  On production, change quickstart to "working" user you ssh with.
sudo chown -R quickstart:www-data <codepath>
# Turn off all permissions.  Turn on read,write,list-directory(X) for quickstart user.  Turn on read,list-directory for apache group.
sudo chmod -R a=,u=rwX,g=rX <codepath>
# Find all folders named "files" and recursively add read,write,list-directory for quickstart and apache.
sudo find <codepath>/sites -type d -name files -exec chmod -R a=,ug=rwX '{}' \;
# For the files_private folder, do the same.
$ sudo find <codepath>/sites -type d -name files_private -exec chmod -R a=,ug=rwX '{}' \;

I can't offer support on getting this to "work" for you on your server. Best to contact your hosting company's support team (or get a hosting company that has a support team. Saving $6/mo can be really expensive).

I'm very interested in feedback on how other peeps do this...

Cheers,

Mike

Also...

MichaelCole's picture

When moving back and forth between Windows and Linux, .htaccess can get lost. I've been bit by this a couple times...

If you update to HEAD on the drush commands, you should be able to run this from drush:

drush help quickstart-fixperms

To update:

cd ~/quickstart
cvs update -dPA

workaround

justaman's picture

I've uploaded the files directly without tar . It is working perfectly now.

I've found that if you tar a folder, .htaccess wont be included (nor any file starting with . ) because "." is not included into " * " definition which is used by the command TAR

so, I have to do something like

tar -cvzf ../acr0214 .

which worked nice on the past, but its a bomb!!! because when someone extract the tar file, all the contents will be shipped to the working folder, therefore mixing up with anything you have there.

I'm going to keep working on this today, Thanks a Lot for your feedback!

Insultar en Internet es como correr autos en calle publica: Aunque ganes, sigues siendo un idiota.

Securing file permissions and ownership

justaman's picture

http://drupal.org/node/244924
* Audience: Site administrators
* Last modified: January 21, 2011

As soon as I have some time, will compare this to mike's config, so I can contribute.

btw, I have a friend who did a script which automatically stages from server A to server B. I think he did it using SVN in the middle, but I'm going to research on this.

Insultar en Internet es como correr autos en calle publica: Aunque ganes, sigues siendo un idiota.

automatic deploy

justaman's picture

Summarized my friend says:

there is folder A where my drupal code is, for us "websites" folder. Then he installs a svn, does commit and checkout on a temp B folder. With rsync he uploaded from B as necessary on the live site C.

That's about code.

Database is another story. Usually valid data is on live server so we can't simply overwrite from quickstart. Drupal stores configuration (eg, module config) on DB, so we can't just copy files and wait for it to work.

He said there are 2 approaches. 1) making notes on the changes, then manually repeating on live server. 2) installation updates (installation hooks)

I will leave DB for another day.

Right now, given that mike already included SVN, it becomes tempting to me to make the code sync. That way I won't be having the permissions issue (hopefully) and additionally the updates will be a lot faster.

Insultar en Internet es como correr autos en calle publica: Aunque ganes, sigues siendo un idiota.

Quickstart Drupal Development Environment

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: