HOWTO Cron Job To Copy Files From Folder To Root
Feb 5, 2008
how to setup a cron job to copy files & directories from one folder to the root folder. I have CPanel X.
My root directory is public_html/
I have another directory public_html/uploads containing both files and directories.
I need a cron job that will copy all the files & directories from public_html/uploads to the root public_html/
If it helps, here is some system info
General server information:
Operating system Linux
Service Status Click to View
Kernel version 2.6.22_hg_grsec_pax
Apache version 1.3.39 (Unix)
PERL version 5.8.8
Path to PERL /usr/bin/perl
Path to sendmail /usr/sbin/sendmail
PHP version 4.4.4
MySQL version 4.1.22-standard
cPanel Build 11.17.0-STABLE 19434
Theme cPanel X v2.6.0
View 1 Replies
ADVERTISEMENT
Nov 25, 2007
i would like to copy index.shtml to these folder in 1 command ...
PHP Code:
[root@BOX wp-content]# ls -latotal 48drwxr-xr-x 9 sitename sitename 4096 Nov 25 16:06 .drwxr-xr-x 6 sitename sitename 4096 Nov 25 15:52 ..drwxrwxrwx 3 sitename sitename 4096 Nov 25 16:05 backupdrwxr-xr-x 2 sitename sitename 4096 Nov 16 15:39 cachedrwxrwxrwx 3 sitename sitename 4096 Nov 25 16:05 gallery-rwxr-xr-x 1 sitename sitename 30 May 5 2007 index.php-rw-r--r-- 1 sitename sitename 457 Nov 25 16:06 index.shtmldrwxrwxrwx 3 sitename sitename 4096 Nov 16 16:27 photosdrwxr-xr-x 28 sitename sitename 4096 Nov 25 15:57 pluginsdrwxr-xr-x 8 sitename sitename 4096 Nov 22 03:01 themesdrwxr-xr-x 3 sitename sitename 4096 Nov 16 04:04 uploads-rw-r--r-- 1 sitename sitename 909 Nov 16 15:43 wp-cache-config.php[root@BOX wp-content]#
i mean to let index.shtml index uploads and themes .....etc in 1 command .
View 12 Replies
View Related
May 30, 2005
This one's pretty simple really, but given the fact that I'm constantly running into crond stops with CPanel servers (no clue why, or where, but it's happening), I'll post this here. If it helps someone, then great, if not, hey, no worries.
Firstly, login as root to your server through ssh, however you usually do .
Next, the script (we'll call it /bin/croncheck.sh). Use whatever editor you choose to create the file.
#!/bin/bash .......
View 14 Replies
View Related
Jun 3, 2009
Is it possible to get [Crone job] that sends a backup copy for single user in the server to another hosting via FTP which has [Domain name/ User /Password] either weekly or 3 times a week
View 10 Replies
View Related
Mar 17, 2015
Ok, new to Plesk, trying to move from ispconfig. So I have Plesk 12 running on Centos 6 64bit in a VPS. I figured out how to upgrade PHP and now I have installed my first website. The website is joomla based but I am getting the below error when installing components:
Warning
Copy failed.
JInstaller: :Install: Failed to copy file /var/www/vhosts/virtual-sim-racing.com/httpdocs/home/tmp/install_55081e65af5fe/pkg_kunena.xml to /var/www/vhosts/virtual-sim-racing.com/httpdocs/home/administrator/manifests/packages/pkg_kunena.xml
Package Install: Could not copy setup file.
This suggest to me a permissions issue - but what to do with it. I have checked all of the relevant Joomla folder permissions and they are all showing as writeable, so it looks like something outside of that?
I don't want to have to stick with ispconfig much longer ...
View 7 Replies
View Related
Dec 15, 2008
how I can create a cron job that runs every 10minutes or so to clear my /tmp folder on one of my servers?
Reason I ask is, it keeps getting filled up and doesn't delete the fiels in it and stops certain scripts from running.
Also, again, I need step by step instructions, such as:
1) what, where the file is I need to place the cron job in
2) what line of code would I put in that file (what does the cron job line look like for every 10min every day)
3) do I need to restart anything, and if so, what command do I run in shell?
View 9 Replies
View Related
Feb 23, 2007
How do I copy all files and directories recursively to another folder?
I did:
cp --preserve -r /sourcefolder/* /destinationfolder/
However, it missed the dot files
View 2 Replies
View Related
Oct 30, 2009
I'm planning a website at the moment but I'm wondering about a slight issue, regarding the local root folder of a website.
Currently, I'm using Dreamweaver to create a website and I have had no problems of uploading my files to a site through Dreamweaver before. But I will not have access to my computer for about one month every year. However, I have a laptop available during that month. But since my local root folder is located on my stationary computer it seems impossible for me to, in any way, use that laptop to manage my site (upload new files to the server).
View 0 Replies
View Related
May 31, 2015
Are some days that in the root of my server there is a folder without a name. I think it is fail2ban to create this folder? Only I have access to the server.
View 11 Replies
View Related
May 1, 2008
I have about 1.80GB of flash games and I want to copy this flash games to another server, I only want to copy the flash games not the entire account.
FYI I have shell access on both server.
View 5 Replies
View Related
Apr 17, 2007
I am trying to copy files from one account to another through SSH, files copy with old account permissions and ownership.
Is this possible when I copy, ownership autometically changed to new account.
I am using CPanel and have root access.
View 2 Replies
View Related
Jan 30, 2008
I setup my cron job run daily and it automatically sends email to root@server.mydomain.com after it done. How do i setup forward email from root@server.mydomain.com to my gmail or other external email provider ? That means every time if root@server.mydomain.com receive email than my other maail will get that email too.
View 4 Replies
View Related
May 29, 2014
I was creating an Plesk extension and I need to edit root's crontab for the extension to work properly. While doing some experiment I understand that the Plesk extension works with the permission of psaadm . So I cannot use shell_exec to do this. Is there any api or cli interface where I will be able to do this. Is there any possibility to override the restriction of psaadm user through extension.
View 4 Replies
View Related
Nov 2, 2009
I'm planning a website at the moment but I'm wondering about a slight issue, regarding the local root folder of a website.
Currently, I'm using Dreamweaver to create a website and I have had no problems of uploading my files to a site through Dreamweaver before. But I will not have access to my computer for about one month every year. However, I have a laptop available during that month. But since my local root folder is located on my stationary computer it seems impossible for me to, in any way, use that laptop to manage my site (upload new files to the server).
View 3 Replies
View Related
Nov 28, 2006
I searched URL....but I still could not get this to work.I need a redirect to a certain folder when people visit the root directory of my site.
View 7 Replies
View Related
Jul 29, 2014
I use Webmin (1.69) to work on my development environment. I am using Ubuntu Desktop 14.04 right now. I am not exactly an Ubuntu newbie but I would not call myself an expert either.
I created a virtual host (newdomain.local) with webmin. I filled in all the fields and saved the new VH definition. I added newdomain.local to my hosts file with an ip address of 127.0.0.1 and restarted apache.
When I go to [URL] ...., it is not taking me to the VH's home page but to the default home page.
Why this might be happening?
View 2 Replies
View Related
Apr 25, 2007
I found that with unix's shell is possible copy all the content of a folder to oneother; I see the manual and found the command cp;
but there are many parameters;
which is that good?
I would like to replicate all that I have inner a folder to oneother;
so at the finish they must to hawe the identically content;
but I see, that some parameters can change symlink etc...
I want one clone exactly .
the originally folder have at inner directory,subdirectory, files htaccess etc..
View 1 Replies
View Related
May 28, 2009
I have tried copy files from Linux server to Windows Server using WinSCP3 and it was so fast.
I am not sure who to copy files as well from Windows to Windows with same speed. I tried to use RDC between the Windows Servers and share one drive. But it wasn't fast as WinSCP3.
View 9 Replies
View Related
Jun 28, 2009
I want to my friend's files from /home/admin/dc
to /home/ as I am planning to rebuild kloxo for him, this could kill all the files so, I would like to know the code so tht I could copy few files from the above location to the home directory
View 4 Replies
View Related
Jul 30, 2009
to move the httpdocs folders of multiple sites on my plesk server to another server (share on other serv is already mounted so thats not an issue) but their is 31 different domains i need to copy. wondering if anyone knows any way to batch automate a cp process to copy each domains files to a new folder on remote server (this is for backup purposes not live sites so i cant use plesk migration etc
View 3 Replies
View Related
Nov 22, 2008
What tool is there for me to copy a lots of file from one webhost (FTP site) to another webhost? Like in for migrating to another host.
I'm thinking of a tool where I can specify the FTP access information for both sites, and it would perform the copy without needing to store the files on my local hard disk first.
View 6 Replies
View Related
May 31, 2009
I rent windows dedicated server for just about a month, but I never had problem.
When I copy files on my home computer and then paste them onto server's drive, files begin copying, but after some time they stop copying and I hear double beep sound.
Time after which they stop copying is random.
View 5 Replies
View Related
Mar 26, 2009
I'm trying to use the "mysqldump" command to get a copy of all databases on the server...
but I need each database to go into a "databaseXYZ.tar.gz" file.
Does anyone know how to do this? So far, I can only get all the databases into a single file. But I need each database to have its own file.
View 4 Replies
View Related
Aug 27, 2007
To automate a task, I need to create a shell script that will allow me to copy the folder blank/ to a new location and rename it to news/, same for the files inside that directory. And, if possible, change the content of one of those files as well.
For example, I need to copy this:
Code:
blank/
templates/
frontend/
index.html
Blank.php
...to a new folder and rename it to this:
Code:
news/
templates/
frontend/
index.html
News.php
View 5 Replies
View Related
Jul 16, 2008
I have two servers.
One server has a folder named 'vidfiles' and I want to transfer this entire folder (all 70gigs) to another server I just got.
Both servers are linux and use CPanal/whm.
What would be the command to get the files to transfer direct from server to server?
View 4 Replies
View Related
Jun 15, 2008
I want to setup a crontab to delete a file every 24 hours, I am not the best in crontab so was wondering if one of you could please give me the command I should use?
View 7 Replies
View Related
Jun 16, 2008
I have a new dedicated server and am trying to set up a cron job via CPanel on on of my accounts (we'll call it "abc" account).
In the Cron job area, where it asks for the command to run, I enter this:
/home/abc/public_html/forum/class/sendnotice.php
But when the job runs, it doesn't seem to be executing the .php file. Instead, I get stuff like this via email:
/home/acb/public_html/forum/class/sendnotice.php: line 1: ?php: No such file or directory
/home/abc/public_html/forum/class/sendnotice.php: line 2: ////////////////////////////: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 3: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 4: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 5: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 6: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 7: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 8: //: is a directory
/home/abc/public_html/forum/class/sendnotice.php: line 9: //: is a directory
So it is as if the cron job is reading each line of the .php file instead of just running it. Am I doing something wrong in setting up the cron job to run that file or could it be a configuration issue with the new server?
View 3 Replies
View Related
Aug 18, 2008
My web host sets up public_html for http and public_ssl for https traffic.
So, if I want my whole site to be secure, I place everything in public_ssl.
However, I am using a shopping cart system inside a CMS.
I want only certain parts to be secure - e.g. the last stage of the checkout procedure.
At the moment, I can only achieve this by having two copies of the CMS/shopping cart, one in public_html and one in public_ssl.
Whilst this approach works (at least from the shopper's point of view), there are lots of problems from a content management point of view.
My host is of the opinion that "this is the only way it can be done".
Is it possible to enable ssl on public_html, have a single copy of the cms there, and then switch between secure and non-secure mode as needed?
If this is possible, can you provide me with a technical description of the setup that I can pass on to my host?
View 9 Replies
View Related