Software :: Write A Script That Would Monitor A Folder?

Mar 31, 2010

I want to write a script that would monitor a folder. Everytime a file is dumped in that folder the script would send it to the proper location.

Example
123.mp3 --> music
something.avi --> movies

and so on , now is there a way to that without running a script in cron or running a loop that activates every 5 seconds or so ??

View 3 Replies


ADVERTISEMENT

Ubuntu :: Allow Write Permissions To The /var/www Folder?

May 31, 2011

There are lots of tutorials and opinions on file permissions and web hosting.
So lets say I wanted to allow write permissions to the /var/www folder.

which would be best practice?

Chown -R user... allow a specific user to have write capabailities.

use gksudo nautilus (unsure what this does)

or open the folder to all parties.

If anyone has any opinions on file permissions in general or web hosting security then feel free to throw them at me.

View 4 Replies View Related

Programming :: Write DOS Script To Monitor The PC's Network Status?

Jan 15, 2010

There are a few PCs on the network that lose network connection every so often -- sometimes these old beasts have a power failure and owing to a bug in the BIOS the NIC doesn't necessarily initialize properly, which requires a reboot to correct it. Got me thinking of a band-aid -- have the PC ping a specific IP address, and if it cannot ping then it forces itself to reboot.

IF I were to write it in BASH I'd do it like this:

#!/bin/bash
HOST=<some meaningful hostname or IP address>
for ipaddy in $HOST
do
count=$(ping -c 1 $HOST | grep 'received' | awk '{print $4}')
if [ "$count" = "0" ]; then
sh usr/bin/reboot
fi
done

In English: send 1 ping to the IP address. Grep through the results to see how many of 1 ping was returned. IF it returns 0 pings then reboot. I'm sure the reboot command would have to be groomed a bit for sudoers but that's beside the point here.

So, HOW do we write something like this for DOS? Stop giggling (lol). No really, I have Windows 2000 & XP machines that need some sort of script or method of knowing (at intervals) of when they're not talking to the Host system, and need to reboot to fix it. I was thinking to write a simple test script, drop it on each of these machines and use the Windows task scheduler to run it every 30 minutes.

View 3 Replies View Related

Fedora Servers :: Cannot Write Into Html Folder

May 9, 2009

I'm setting up my fedora 10 server. I am currently working on samba. I have added users and created their home directories with their own html directories. I have changed their html directories to 777. However, it appears to be read-only since I cannot create files or folders within it. Can anyone please give me some ideas as to what may be causing this? Probably some extra configurations I may have overlooked? Any help would be kindly appreciated. I also created a general wshare (writable share) directory for all users within home directory but I am encountering the same problem and cannot write to it.

View 8 Replies View Related

Ubuntu Networking :: Can't Write To My NFS Shared Folder?

Feb 24, 2010

I have a MacBook Pro.I just got it to "mount" the recording/video folders using NFS to connect to my mythbox.Here is my /etc/exports file:

Code:
/var/lib/mythtv 192.168.0.0/255.255.255.0(rw,async,insecure,all_squash,anonuid=1000,anongid=1000)
Here is my hosts.allow file:[code]....

I also made sure that under Settings -> Shared Folders, the "Read-only" box was unchecked.I did all this and I still cannot get the MacBook to write to the mounted folders.

View 2 Replies View Related

Server :: Write Permission For Users On NFS Folder?

Dec 28, 2010

I have setup a NFS server and this the content of /etc/exports at the server with IP A.B.C.D1 is:/home/shared A.B.C.D2(rw,no_root_squash)Problem is, only the root at A.B.C.D1 and A.B.C.D2 can write to that folder.

View 9 Replies View Related

CentOS 5 :: Allowing Apache To Write To Folder?

Jul 29, 2009

I'm a PHP developer and an app I'm working on right now generates files for users to download. The problem I'm seeing is in order to write to a folder I have to chmod it 777, obviously a bad idea.

I'm thinking the best idea is to change the folder user / group to that of apache, however after over an hour of Googleing I can not find out what user / group apache belongs to.

Thoughts? Is this the best way to go or should I do something else?

View 3 Replies View Related

Programming :: Write A Bash Script That Continue Monitor The Tmp Directory?

Dec 25, 2010

In my tmp directory some logs are creating continue (with name logs.txt1, logs.txt2 up to 245). Some times these logs are creating continue within 1 or 3 second gap, now I want to write a bash script that continue monitor the tmp directory and if any time logs create simultaneously within 1 or 3 section gap it will alert me..( generally logs are create with the gap of 5 or 10 minutes duration or some time after one hours )

View 1 Replies View Related

SUSE / Novell :: Write A Script To Monitor Memory And Cpu Usage?

Jul 22, 2009

Im just trying to write some script to caputre memory and cpu usage on SLES servers, I just wanna use "top |grep Mem" and "top |grep Cpu". when I ran the above command, it just keep going. i just want to get one line each for memory and cpu.

View 3 Replies View Related

General :: Let User 'Y' Write In Folder 'A' Only When Executing Script 'X'?

Feb 17, 2010

How do I let user Y write in folder A only when executing script X?

View 3 Replies View Related

Ubuntu :: Deleted Resolv.Conf Folder - How To Write New One

May 1, 2010

Unfortunately I have deleted with sudo the resolv.conf folder in /etc/. How can I write a new one? What files contains your resolv.conf folder?

View 3 Replies View Related

General :: Allow Specific User Permission To Read / Write Folder?

Feb 4, 2011

allow specific user permission to read/write my folder

I have a folder called /TAR/Sketch

I added a new user, named Snoopy, I want to grant this user the ability to add files & directories to this folder which is under the group Sketches and the owner is me.

How can I accomplish this ?

View 1 Replies View Related

Ubuntu :: Give Read And Write Permissions To Game Folder?

Aug 6, 2010

Just finished downloading a game in .run format, i downloaded it to my Home>Downloads folder and ran these commands in terminal: (game is tremulous if it matters)

chmod +x tremulous.run
./tremulous.run

It started it up in the terminal and i began working my way through the installation process, and i tried to install it into my Home>Games folder. (Is it supposed to be home>games or your username>games?)

and it said PERMISSION DENIED. No write permission to Home/Games/

How do i give myself read and write permissions to my game folder?

View 3 Replies View Related

Ubuntu :: No Write Permission Even Though User Is Member Of Folder Group?

Oct 29, 2010

I'm having an odd problem (although I'm probably missing something obvious to a non-semi-newbie):I have a directory used for samba shares which is owned by user fred, a system user which the windows clients on my network authenticate with to access the shares. I, roger, want to access the directories without having to put my 'sudo boots' on every time, so I made the directory group users and added roger to that group, and changed the file/folder modes from 0755 to 0775.However I still do not have write permissions inside the directory; I still seem to be considered 'other' and hence only have read and execute.

View 6 Replies View Related

Ubuntu Servers :: Write Acces In Win7 Folder Via Samba?

Nov 22, 2010

Not sure if this is the correct forum for this but I run ubuntu 10.04 server in virtualbox, and have samba running. I can see the files and read them in win7, but I want write access aswell!

I need to do this in terminal only, and Im not that well versed in Linux or the terminal. Anyways here is my smb.conf:

[global]
security = share
workgroup = myworkgroupname
load printers = no

[Code]...

Since "read only = no" I think i should have write permissions... and since I can read the files Im guessing the smb.conf is the problem?

View 3 Replies View Related

Ubuntu Networking :: Windows XP Pro - Write And Delete From Folder And Lucid

Dec 22, 2010

I just got a new PC with 2TB of HDD space and it's running Ubuntu 10.04.1 32bit. I have created a user for networking, called share and have created a folder within the home folder called public. I then shared the folder and gave 777 access to it as I want this to be public - but for my local network and my later for ssh access. I have installed samba, and under the sharing options I allowed for guest logins and people to write and delete from folder. SO how would I be able to "see" this from my windows machine? It's running XP pro and it has a domain other than workgroup - but that shouldn't affect it should it?

Also, the laptop with XP is on the wireless with and internal IP of 10.0.0.135 and my PC is on the LAN connection with and internal IP of 10.0.0.1 I'm sort of familiar with networks, but I have NO clue as to how to do this.

View 3 Replies View Related

Ubuntu :: Change Write Access Of Files Inside A Folder?

Jan 17, 2011

ok trying to use grip but it keeps giving me this messageCode:No write access to write encoded fileso i have a folder in my home folder called flac and i want to modify the folder so that all files within can be written toi have tried

Code:
chmod -R 777 flac/*
and

[code]....

View 9 Replies View Related

Ubuntu Networking :: Can't Write To Shared Folder From XP To Vice Versa?

Aug 13, 2011

The title says it all: I have two folders which I share in Ubuntu (10.10), one of them is "public", so I set it to allow guests to create/move/delete files in the folder. Then there is my mother's PC running Windows XP Professional (also one shared folder with write access). When I was using Windows 7, I could create/delete/edit files on my mother's shared folder but now, using Ubuntu, I can only read from it. Same with the shared folder in Ubuntu, I can only read it from XP but not write to it.

View 6 Replies View Related

Software :: Write A Cron Jobs In System To Monitor Project Diskspace Usage?

Jul 28, 2011

How to write a cron jobs in linux to monitor my project diskspace usage?
check diskspce= du -h .

any clue for me as a beginner?

View 7 Replies View Related

Debian Configuration :: Give Application Write Access On Folder And Its Files

Mar 23, 2011

is there a way to give an application (controlaula) write access to a folder /var/lib/monitorprofe and files on that folder.

View 3 Replies View Related

General :: Give Write Permissions To Multiple Users On A Folder In Ubuntu?

May 9, 2011

There is a folder that is owned by user tomcat6: drwxr-xr-x 2 tomcat6 tomcat6 69632 2011-05-06 03:43 document. I want to allow another user (ruser) write permissions on document folder. The two users (tomcat6 and ruser) does not belong to same group. I have tried using setfacl: sudo setfacl -m u:ruser:rwx document

but this gives me setfacl: document: Operation not supported error.

View 1 Replies View Related

General :: Write A Script To Move Specific Files In Various Folders To One Folder?

Nov 16, 2010

Terribly new to Linux and find it mindboggling. I work on brain imaging and unfortunately all of the analysis runs on Linux, and I do not understand computers well coming as I do from a medical background. So my question - There are various folders of patient MRI scans (folders called P1, P2, P3 etc) and within them are enclosed certain files that I am interested in (always called the same name in all folders, say image001). I would like a script that enables me to copy and move this image001 in all these individual folders to another folder altogether.

View 13 Replies View Related

General :: Share A Folder In Samba With No Need Of User Password With Write Permission?

Jun 13, 2011

I would like to know how can I share a folder in samba with no need of user and password with write permission, with no need of using guest user.

View 3 Replies View Related

Slackware :: NFS - How To Speed Up Large File/folder Transfer - Write - Speeds?

Dec 13, 2010

About NFS.

Server:

Client(s):

Code:

I have followed Robbie Workmans' HowTo [url]

Reading and writing works absolutely fine with small files but large files are tediously slow in writing to the server. (rw,no_subtree_check) are options in exported directories.

What is your experience with NFS and how can I speed up large file/folder transfer(write) speeds?

View 5 Replies View Related

Programming :: Monitor A Folder For New / Change Files?

Aug 30, 2010

how I can monitor a folder and get the name of newly created files or files that their size is changing? (in Perl or Linux shell script)

View 5 Replies View Related

Ubuntu :: Possible To Write Script / When Prompted In Terminal To Output Tree Listing Of Files And Folder

Mar 9, 2010

is it possible to write a script, when prompted in the terminal to output a tree listing of files and folder with out using a tree command.for example. control the output of ls -l to output that list like a tree (-- or /-)

View 3 Replies View Related

Ubuntu :: Command Line (write A Short Script That Will Compress A Specific Folder) - 7zip

Oct 6, 2010

i need to write a short script that will compress a specific folder that`s on the Desktop (and all it`s content) and also will encrypt it with a password that is inside the script --->meaning it wont ask for a password+verification when compressing+encrypting

View 1 Replies View Related

Server :: Configure Samba In Centos - Give Permission For User - Can Able To Read And Write The Particular Folder

Apr 23, 2011

I Have Configure Samba server in Centos, I need give permission like for some user(5User) can able to read and write the particular folder, and again i need give some another user(6user) can only read permission for same folder.

View 1 Replies View Related

Ubuntu Security :: Monitor A Certain Partition / Folder To See If Any Changes Has Made

Apr 22, 2010

i need a way to monitor a certain partition / folder to see if any changes has made is there anyway of doing that ?

View 4 Replies View Related

General :: Write A Shell Script Which Can Ready Content Of The Folder And Place Files On Remote FTP Server?

May 9, 2011

I need to write a shell script which can ready content of the folder and place files on remote FTP server. I need to make sure that a file that is already placed on remote FTP server is not attempted second time. The file names will be something like Records-2011-05-09. The files will be generated by MySQL every hour.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved