Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Is there a suggested limit for number of files in a directory? I'm approaching 15,000 in the uploads directory for a website and was curious if it was necessary to split them up to different folders.

Adbot
ADBOT LOVES YOU

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Bump for my question!

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

dfn_doe posted:

You haven't told us what filesystem, what kernel version, what partition type, etc...

fedora core 4
kernel: 2.6.9-023stab040.1-enterprise
filesystem: vzfs (virtuozza?)

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
How do I make MRTG not run from 12-1AM when my backups are made and FTP'd so I don't get useless graphs like this:



Right now it's setup to run every 5 minutes in crontab

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
I followed this guide exactly, and when I try to login it says "Server refused our key". Anybody know what could be wrong? I'm running FC4.

http://www.howtoforge.com/ssh_key_based_logins_putty

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

thenameseli posted:

I don't have much experience with those PuTTY utilities, but just a few things to make sure you have set up correctly:
-As mentioned in the comments, you should use ~/.ssh/authorized_keys . Make sure this is in the home folder of the user you are logging in as.
-Make sure the following lines are in your server's sshd_config
code:
RSAAuthentication yes
PubkeyAuthentication yes
PermitRootLogin yes # if you are trying to login as root, although not recommended.
-Make sure there are no extra restrictions on your authorized_keys. For example, if you prepend the key with from="[ip range]" you will only be able to login from those ips.

Besides that, all you need to do is put the public key on one line in authorized_keys and authenticate with the private key.

Also, check the output in the server's log. Probably /var/log/auth.log or /var/log/syslog

I assume you can log in with a password alright?

Ok - had to uncomment those lines in my sshd_config. The public key is in my authorized_keys file. I can login with a password, but the autologin still isn't working. I don't see a syslog or auth.log

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Is there a way to see live traffic statistics for apache?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
I'm trying to move a large directory of files to a new server

I tar'd the folder using tar cvf uploads.tar uploads (figured I didn't need the compression since they're all jpg's anyways)

Then on the new server I ftp in with ncftp to grab the tar, but it keeps going over 100%

ncftp /httpdocs > get uploads.tar
uploads.tar: ETA: 0:00 4.30/ 4.07 GB 5.75 MB/s


And when I untar it I get an error a few minutes into about corrupt headers. What's going on here. I don't get any errors when I create the tar.

quote:

tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Error exit delayed from previous errors

md5's don't match either.

fletcher fucked around with this message at 07:23 on May 10, 2007

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

teapot posted:

Switch to the binary mode before requesting the file. By default FTP is in text mode.

And what happened to ssh? My usual directory transfer procedure is
code:
cd /somedir && ssh otherhost '(cd /someotherdir && tar cz . )' | tar xvz

Ahhh, thank you.

And drat that line is slick, I'm such a newb on linux, I'm using that from now on!

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
20,000 files in an uploads directory, i want to chmod all the ones that aren't 0644 to 0644. how do i do this?

chmod 0644 *.* yields "-bash: //bin/chmod: Argument list too long"

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Twinxor posted:

code:
find -true -exec chmod 0664 {} \;
I originally posted a commang to pass the files to chmod via stdout, but I don't think that's allowed.

awesome, thanks!

how about one to change all the files that are owned by user1 to user2?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
How do I give username fletcher access to all files and folders in /var/www on a FC4 system?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

teapot posted:

Add it to the group that those files belong to. Access (read-only or read-write) will be determined by group access permissions. Take into account that files created by that user will belong to his group unless the directory is set-group-ID (see previous discussion about group ownership on Solaris). If you need something more complex, use ACLs.

Awesome, thanks.

I am starting to hate Plesk on my server, and since I'm going to rebuild the whole thing I might as well reconsider my apache/mod_php/mysql setup. I was looking at alternatives such as Resin and lighttpd. What is my best option? The Java implementation of PHP in Resin has some pretty convincing performance claims.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
I'm trying to setup lighttpd and when I try to open a php file from a virtual host it prompts me to download the php file (which contains the source of the php I want executed)

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

teapot posted:

It means, you have not configured php, so http server does not run it. lighttpd uses a fastCGI version of php, and should be configured to do so.

I compiled it with --enable-fastcgi and put mod_fastcgi in my lighttpd.conf

edit: ah I think I need to recompile php with fastcgi support

fletcher fucked around with this message at 05:42 on Aug 2, 2007

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
resin, ligghtpd, or apache. Which is best for a php/mysql web app?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
how do I make every file in a directory readable by any user on the system?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
How can I rename all .jpeg files to .jpg in a very large directory, preserving the original filename? There are ~30k files in the directory.

fletcher fucked around with this message at 01:56 on Nov 23, 2007

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Thanks Scaevolus!

Another question: is there a limit for the number of files mget will download via ftp? I tried to transfer a directory of 130,000 pictures and it only transferred exactly 99,999. Is something else causing this or is it an mget limit?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

GeneralZod posted:

Some ftp servers will limit the number of items returned when your ftp client requests the list of files in a directory, which has been a pain in the arse for a project I'm working on (mine is limited to 2000).

How can I increase the limit or download the files I don't have yet?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

GeneralZod posted:

The limit is determined by whoever hosts the server, so you'll have to ask them :/

For my project, I used the appalling workaround of simply downloading the index.html using HTTP (which apparently doesn't have this limit) in order to get the full list of files in a directory.

So what do they have to change? Is it just some variable that needs to be set in proftpd.conf? How, specifically, do you set it?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
So nobody knows the setting to allow proftpd to let clients download more than 100,000 files in one mget?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Is there a way to get a directory listing to a text document (and add an http://www/path) so that I can easily use wget on another machine to grab every file on that list?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Awesome, thanks! I appreciate the explanation of each command too, it really helps!

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
How do I upgrade from PHP 5.1.6 to 5.2.5 on Fedora Core 6?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Alowishus posted:

Best approach would be to upgrade to Fedora 8, which will get you to 5.2.4... and Fedora 6 isn't supported any more anyhow.

If you don't want to do that, you could try simply installing the PHP packages from Fedora 8. If those won't install due to dependencies, you could try grabbing the source RPM from Fedora 8 and rebuilding it (rpmbuild --rebuild) to see if that process generates FC6 installable packages.

If that doesn't work, check around some of the web hosting boards... there may very well be some folks maintaining PHP 5.2.x packages for older Fedora systems, as this is frequently an issue with webhosts who don't want to keep doing OS upgrades.

And last, if all else fails, take out the Fedora PHP RPMs altogether and just build your PHP of choice from source.

Unfortunately Godaddy only offers Fedora Core 7 as of now. I really only wanted it for json_encode and json_decode, which I found out can be used on my current version after a simple "pecl install json" command. Hooray!

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Can you rsync multiple directories with one call?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
When crontab emails me about a job it did, where is the email it says it's from set at?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
How do I upgrade MySQL on Fedora Core 6?

I'm running 5.0.22 and I need > 5.0.25. I tried "yum update mysql" and it didn't work.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
I have a shell script and at the end of it I want it to echo the time it took to run, how would I do that?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Is there any performance reason to split up directories with a large (100,000+) number of files? The files are only read individually, a directory listing of them is never needed.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Does /etc/init.d/mysqld restart reload /etc/my.cnf? How can I tell if the changes I made in my.cnf took effect?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

bitprophet posted:

Yes, because the init script restarts the MySQL process, and of course when MySQL starts up it will read its configuration file. Regarding detecting the changes taking effect, well, that obviously depends on what changes you made...v:v:v but I can guarantee you that unless running the init script is failing to actually restart MySQL for some reason (which they can do on occasion, albeit not usually silently) it will definitely pick up your changes to the conf file.

Yea, I can see now that it did make the changes. The confusion I had was that it couldn't write to the log file I told it to write to, just took a chown mysql.mysql and now it is logging slow queries.


How is a server typically setup and configured? I'm going through everything, trying to setup my.cnf, httpd.conf, etc and getting everything (hopefully) configured correctly. I know I am going to have to do this again and again in the future. Should I be writing an ant build script as I go to automate loading all these config files, setting file/directory permissions, etc?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
I'm a little confused on how to setup directories/permissions for apache. I'd like to login to my server as user fletch, and have all my virtual hosts in directories like ~/www/domain.com/. Apache runs as user apache group apache though, so I get a 403 no permission when I try to go to domain.com. This goes away if I chown -R apache.apache the directory, but I don't want to do that.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Alowishus posted:

As long as every directory starting with /home/fletch has the o+x bit set, Apache should have no trouble serving your files.

Sorry, I'm not familiar with the lingo...What does that mean?

Alowishus posted:

By default your home directory is generally chmod 700, which prevents Apache from serving anything inside. If this is a more recent system with SElinux enabled, that could also be getting in the way, but there's a boolean toggle that enables a policy which lets Apache serve content from user's homes.

It's a fresh install of Fedora Core 7 on a vps through Godaddy. How can I tell if SELinux is on it?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

chryst posted:

code:
$ find /home/fletch/ -type d -exec chmod 0755 {} \;
(or 0751 if you only call files explicitly and don't expect to need directory listing.)
$ find /home/fletch/ -type f -exec chmod 0644 {} \;
(You might actually need 0755 on files in cgi-bin, but make sure you know which ones, and why.)

Ok, both of those commands returned no results, but they should right? Adding the user to the apache group and setting the umask seems like a good solution for me. I'm the only one that will be logging into the server, ACL looks like it's a bit overkill. Is the correct way to do that usermod -a -G apache fletch?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
What kind of specs are typical for a FC7 server hosting a PHP/MySQL application to 50-100 users peak? Can I get away with a VPS?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
What's a good way to monitor a server? I'd like to be able to see stats about apache, mysql, and bandwidth, cpu, memory, etc all on one page.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

tehk posted:

I know GenericAdmin uses RRDtool, I remember a front end for it to produce live streaming results.

edit: I am stupid Munin is the front end. Check it out here, it provides a web interface and is supposedly plug and play

edit2: Here is the munin live demo

Wow that is sweet! Setup is a breeze too. Thanks a bunch!

Adbot
ADBOT LOVES YOU

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
If I own somedomain.com and it's pointed to my linux server, what's the easiest way to get mail sent to *@somedomain.com forwarded to another email address? Do I have to setup a whole mail server just for this?

fletcher fucked around with this message at 05:58 on May 6, 2008

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply