have setup a LAMP server with ubuntu 10.04 server edition x86 for my study in VMware Workstation 7.1 For a assignment I had to make a php script that would load a file up to the server and set the name in a mysql database. According to the book the server should set the image in a cryptic folder in the /tmp/ folder.
This isn't working and i also try'd locate and find to find the image i uploaded. I checked the php.ini and file uploads were on but no folder so i set that one to /tmp/ but still no images. Can anyone help me with enabling this function?
I was wondering if anyone knows how to change the timestamps of folders recursively based on the latest timestamp found of the files in that folder.
So for example:
Code: jon@UbuntuPanther:/media/media/MP3s/Foo Fighters/(1997-05-20) The Colour and The Shape$ ls -alF total 55220 drwxr-xr-x 2 jon jon 4096 2010-08-30 12:34 ./
I'm trying to rename files recursively from a folder. I want to delete the & from every filename. i've searched the net and found the following script:
Code: #!/bin/bash dir=/whatever/directory for file in `ls $dir` ; do # ANYCASE TO UPPERCASE: newname=`echo $file | tr '[a-z]' '[A-Z]'` mv $dir/$file $dir/$newname done and changed it:
Code: #!/bin/bash dir=/home/test for file in `find $dir -type f` ; do #rename files containing & newname=`echo $file` | tr '[&]' '' mv $dir/$file $dir/$newname done
But the for loop explodes the filename after each & sign, so i don't have a whole filename. if the file is named lorem & ipsum, the for loop will break it in 3 parts.
I'm looking for a shell script that will recursively make all of the file and directory names in a large directory tree lowercase. It has to work with file and folder names with spaces and keep the spaces in the converted names. The reason I want to do this is because most of my personal files are on my Windows partition, and before I discovered Ubuntu, I made my file and folder names have mixed case as in "My File.txt", and now I want it to look like "my file.txt".
Im trying to change permissions so i can upload to my proftp server. i can download ok but i want to access most folders via ftp so i can upload to them, at the moment i get permission denied message.
I have many clients uploading to the same directory.
I have set chmod to 733 and chown to another user on the upload folder so that the different clients do not see each others files, but that also causes the client to not see their own files after they are uploaded or not being able to resume broken uploads.
I would like the different user log in with their own username and password but all upload to the same directory and not see each others files, but just their own. Is this possible? Or does anyone have a tip how to achieve something similar?
When I try to upload files via FTP to a specific folder (/var/www/myfolder/) I get the message 550 permission is denied. I set CHMOD 777 for this folder (I had to do this via SSH cause I was not allowed to do this in FileZilla)
I installed lxadmin and now when I try upload files to my lxadmin users public_html folder I get the following message. Cannot write to `backup.zip' (No space left on device). After checking with df -h i noticed / is full.
Say, I have a header file containing all required includes: Code: /* global.h */ #include <stdio.h> #include <unistd.h> ... #include <dirent.h> #include <signal.h> ... /* and so on */
I have several modules in a program (*.h *.c files) and in each *.h I include global.h, then they are included in corresponding *.c files. And I receive strange messages from compiler, like a "warning: implicit declaration of function fdopendir", "error: expected declaration specifiers or '...' before 'siginfo_t' ", "error: 'DT_DIR' undeclared..." though these types, functions and constants are all declared in system headers. What does it mean?... Compiler is GCC 4.4.4-2, system is Fedora 13 x86_64
However, configured a website on a dedicated server using WHM/cPanel. The site was uploaded using the master account for the website.
The security issue is public users are able to upload files on to my server via the website. They could even access the root and execute whatever they want on the server.
I have consulted with 2-3 Linux experts. According to them, the PHP user has rights to execute anything on the server or upload & store files in whichever folder they want.
Can I protect my folders to avoid file uploads via the website. The application has security vulnerabilites. However, I want to prevent hackers to enter my site until the vulnerabilities are fixed.
I have searched diligently but can't seem to find a way to search by exif date. Most of my searches turned up commands to manipulate EXIF data not just search by it. I have found some likely tools but suspect that I don't know enough bash to recursively find a .jpg file by it's exif date. For example, exiprobe and exifgrep look promising (see examples below).
I have made some progress. At first, I couldn't associate the file name with the date given but learned that the "n" option forces each output line to start with the file name. Now, I need to make the command recurse but can't seem to manage it. halloween_IMG_0965.JPG: JPEG.APP1.Ifd0.Exif.DateTimeOriginal = '2009:10:31 20:58:52 If it helps, I have linked to the man pages [URL]
I'm a 1st-year CS major and am new to Java. I had a question about importing packages. As I understand it, when you use a wildcard when importing, it will import the classes within the package specified before the asterisk, but none of the subpackages in the specified package.is there a way to include all classes and subpackages recursively with a single line, instead of doing:
My problem is this:I have a number of directories, all containing files of different name lenghts, including letters, numbers and possibly spaces. I want to recursively rename all of these files, so that only the _last_ 5 digits (not counting the extension) remain. In other words: I want to cut off all but the last 5 digits and not touch the extension.
I've tried to read up on tr, rename (perl version), sed, cut etc. and browsed through some threads here, but so far couldn't quite figure out how to do it.
If someone could point me to the right (standard) CLI tools and syntax.
I've found myself in the situation where I need to create a menu in gnome/kde for a directory structure full of documents.The directory structure looks like this:
I have a directory listing with many subdirectories having many files. I want to recursively search for the oldest 5 files starting from the base directory and not 5 from each subdirectory. I am writing a shell script which sorts them using ls -lRtur|egrep "txt|jpg" > /tmp/file1 Now from this /tmp/file1 file I want to sort the files same as what the ls -ltr command does that is oldest file time to newest file time first. How do I sort based on Linux time stamp? The files itself also have Linux timestamps embedded in them So I can sort based after extracting them as well if it is easier. My /tmp/file1 has entries like below.
i am trying to upload a file with cgi. I have an html code like below :
<table class=upload> <form method='POST' enctype='multipart/form-data' action='upload.cgi'> <input name=upfile type=file ><br> <br> <input type=submit value=Press> to upload the file!</form> </table><br>
I am trying to get the file with upload.cgi and execute a linux command in linux but i do not know how to. I use C code for that. Can you help me,please? How can i know the file from html in cgi C code?
About php upload. I want a php upload script that renames and overwrite every uploaded file as onscreen.jpg I googled it but only found random number rename. Not working for me I want file name change and overwriting file on server.
I want to know what is the best way/practice to let users upload and download files? I want to be able to let the user upload a file, list all the files uploaded, and allow him to download any file from that list, also delete a file. To my understanding I can make a php script to let them do this and the uploaded files are in a specific folder in the server or I can insert the files into a SQL table. Which direction should I go, let them directly upload the files to a specific folder (no SQL involve), or upload the files into a SQL table?
The software Nagios uses .cgi files to show a lot of things.. services, hosts, etc etc. Is there any way to pick up those .cgi files and import them to other web page? how to do it?
When I upload a file to a shared folder, it gives me the choice of checking a check box that says "publish", what's the difference between checking/not checking it?
But the problem is that this file never gets saved to /var/upload directory (I changed php.ini file, so that uploaded files should be saved into /var/upload. I tried /var/tmp as well, but it's the same). Here are also the permissions of this dir:
BTW, I use Mandriva 2010 64 bit distribution. I spent last two days searching for solution on internet forums, asking people and made absolutely no progress. is it possible to debug what is happening with the supposedly uploaded file? I mean any logs, where I could find trace, what's going wrong? I tried to check /var/log/httpd and files in there, but no success either...
I want a script that will send me an email when a file is created on a directory. The script will be monitored by cron. It should actually monitor an FTP directory for any uploads to the FTP directory
I want the LAMP server to present an upload page to the user The user uploads a zip file containing txt files which are tables in clear-text format The server : opens the zip validates the text files (going to skip this for now, but will try to make later) converts the files as here imports them to MYSQL tables All this is supposed to happen automatically, then the user can immediately use the website with the updated data How to implement this (esp. the first part with the zip file)
i'm trying to create simple form that will also upload only xml data. first, the user will need to upload an xml document only by clicking submit, the data will be posted to the server and the user will be redirected to uploader.php. This PHP file is going to process the form data and do all the work.
upload a file to a business partner of ours in another country. Currently they have an SFTP server set up for us that I am using to download a daily generated file from a previous requirement. I use a bash script to download it since its fairly simple.
sftps manual page only gives a hint about using a batchfile, however i still cannot get it to work. Does anyone know another way? Or if you can even suggest another method or application? It seems like a bit of a cop out you can EASILY download using the sftp command but can't upload.
EDIT - forgot to mention I have already got keyless entry set up using ssh keys.