Problem You want to make proftpd to allow access for certain FTP users only from certain IP addresses. Analysis One possibility is to use mod_ifsession. Solution Install mod_ifsession. Define a Class in your proftpd.conf: <Class friends> From 1.2.3.4/8 </Class>
mkdir and PHP with SAFE_MODE Enabled
Problem You want to make PHP to create directories whose owner is not apache user/group, but PHP script owner/group. At the same time you need SAFE_MODE to be enabled. Analysis The problem is that apache runs under certain user-group privileges
Examples of ‘find’ Command Usage
Examples of find usage: find /var/spool -mtime +60 Find every file under the directory /var/spool that was modified more than 60 days ago. find /tmp -name core -type f -print | xargs /bin/rm -f Find files named core in or
Creating large tar archives
Problem You need to tar thousands of files into a single tar archive. Analysis You can not simply do “tar cvf archive.tar ./*” because tar gives you an error that there are too many files in the argument. Solution Instead
bash: Removing large number of files which contain specific text
Problem You have a huge number of files (50000) in a single directory. You need to automatically delete the ones which contain a specific text, i.e. “SPAM”. Analysis You can not simply use rm combined with grep, because the argument