Search Results

Search found 735 results on 30 pages for 'chmod'.

Page 26/30 | < Previous Page | 22 23 24 25 26 27 28 29 30  | Next Page >

  • How do I get Apache 2 to read this directory?

    - by Mike
    I'm on Mac OSX and i I have apache2 installed via MacPorts, running as the _www user. I have some files I want to serve in the /Users/Me/Documents/abc folder. Right now, though, the permissions of /Users/Me/Documents are 700. So, _www can't get in, even if abc is chmod 777. I recognize the following options: Allow _www access to my Documents folder. Put the files I want to share outside of my Documents folder. Hard-link the files outside of my Documents folder, and point apache to the hard links. None of these solutions are acceptable to me, however. I don't feel safe allowing _www access to my entire Documents folder. I really want to keep the files in my Documents folder for other reasons. The files are changing all the time, so hard-linking would not always reflect the right file structure, and, as I understand it, you can't hard-link a directory (though, if you could, that would solve it). Any ideas for a solution? Is there a way to run a few httpd processes as my user account so it can get in there? Or, is there some way to hard-link a directory, or some way to get httpd to follow a symlink past a directory that is 700 not owned by _www? Thanks!

    Read the article

  • "No such file or directory"?

    - by user1509541
    Ok, so I have a VDS laying around, and I thought I would turn it into a TF2 game server. When I connect to my server through PuTTY, and use wget to download the package "hldsupdatetool.bin" from Steampowered.com. I go to run it and it says "No such file or directory found". When I use "ls" to see what files are in directory, it lists "hldsupdatetool.bin" as being in the directory. So, why is it saying it's not there? This has been a headache for the past 2 days. It's returning: root@10004:~# wget http://www.steampowered.com/download/hldsupdatetool.bin --2012-07-08 06:04:49-- http://www.steampowered.com/download/hldsupdatetool.bin Resolving www.steampowered.com... 208.64.202.68 Connecting to www.steampowered.com|208.64.202.68|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 3513408 (3.4M) [application/octet-stream] Saving to: “hldsupdatetool.bin.3” 100%[======================================>] 3,513,408 2.45M/s in 1.4s 2012-07-08 06:04:51 (2.45 MB/s) - “hldsupdatetool.bin.3” saved [3513408/3513408] root@10004:~# chmod +x hldsupdatetool.bin.3 root@10004:~# ./hldsupdatetool.bin.3 -bash: ./hldsupdatetool.bin.3: No such file or directory root@10004:~# More: root@10004:~# ls ffmpeg-packages hldsupdatetool.bin.1 hldsupdatetool.bin.3 hldsupdatetool.bin hldsupdatetool.bin.2 setup.sh root@10004:~# ls -la total 13828 drwx------ 4 root root 4096 Jul 8 06:04 . drwxr-xr-x 21 root root 4096 Jul 8 05:57 .. -rw------- 1 root root 8799 Jul 8 06:26 .bash_history -rw-r--r-- 1 root root 570 Jan 31 2010 .bashrc -rw-r--r-- 1 root root 4 Jul 2 19:39 .custombuild drwxr-xr-x 2 root root 4096 Jul 4 18:49 ffmpeg-packages ---x--xrwx 1 root root 3513408 Sep 2 2005 hldsupdatetool.bin -rwxr-xr-x 1 root root 3513408 Sep 2 2005 hldsupdatetool.bin.1 -rw-r--r-- 1 root root 3513408 Sep 2 2005 hldsupdatetool.bin.2 -rwxr-xr-x 1 root root 3513408 Sep 2 2005 hldsupdatetool.bin.3 -rw-r--r-- 1 root root 140 Nov 19 2007 .profile -rw------- 1 root root 1024 Jul 2 19:49 .rnd -rwxr-xr-x 1 root root 38866 May 23 22:02 setup.sh drwxr-xr-x 2 root root 4096 Jul 2 19:44 .ssh root@10004:~#

    Read the article

  • How do I setup an Alias on Apache with XAMPP on Linux ? (Permission problem)

    - by knarf
    XAMPP works fine but I want to have http://localhost/f to point to /home/knarf/prog/php/fwyxz. I've chmod -R 777 /home/knarf/prog/php/fwyxz I've added Alias /f /home/knarf/prog/php/fwyxz at the end of the httpd.conf And when I try to access it, I get a 403. From the apache error_log: [error] [client 127.0.0.1] (13)Permission denied: access to /f denied. I've already tried several solutions (userdir and symlinks) but they both failed with the same error. I've also tried to add this after the Alias: <Directory "/home/knarf/prog/php/fwyxz"> Order allow,deny Allow from all </Directory> But again, permission denied. Now if I change the User/Group under which apache runs from nobody to knarf, it seems to work (static files are ok) but PHP can't use/initialize sessions : [error] [client 127.0.0.1] PHP Warning: session_start() [function.session-start]: open(/tmp/sess_r5nrmu4ugqguqqe83rs53lq6k0, O_RDWR) failed: Permission denied (13) in /home/knarf/prog/php/fwyxz/index.php on line 3 [error] [client 127.0.0.1] PHP Warning: Unknown: open(/tmp/sess_r5nrmu4ugqguqqe83rs53lq6k0, O_RDWR) failed: Permission denied (13) in Unknown on line 0 [error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0 This is really frustrating.

    Read the article

  • Non-restored Files Corrupted on System Restore

    - by Yar
    I restored OSX 10.6.2 today (was 10.6.3 and not booting) by copying the system over from a backup. The data directories were not touched. In the data directories, I'm seeing some files as 0 bytes, and getting permission-denied errors when copying, even when using sudo cp or the Finder itself. Some programs, differently, take the files at face value and see no permission problems (such as zip), but they see the files as zero bytes, which would be game-over for recovery. cp: .git/objects/fe/86b676974a44aa7f128a55bf27670f4a1073ca: could not copy extended attributes to /eraseme/blah/.git/objects/fe/86b676974a44aa7f128a55bf27670f4a1073ca: Operation not permitted I have tried sudo chown, sudo chmod -R 777 and sudo chflags -R nouchg which do not change the end result. Strangely, this is only affecting my .git directories (perhaps because they start with a period, but renaming them -- which works -- does not change anything). What else can I do to take ownership of these files? Edit: This question comes from StackOverflow because I originally thought it was a GIT problem. It's definitely not (just) GIT. Anyway, this is to help put some of the comments in context.

    Read the article

  • Why is /dev/urandom only readable by root since Ubuntu 12.04 and how can I "fix" it?

    - by Joe Hopfgartner
    I used to work with Ubuntu 10.04 templates on a lot of servers. Since changing to 12.04 I have problems that I've now isolated. The /dev/urandom device is only accessible to root. This caused SSL engines, at least in PHP, for example file_get_contents(https://... to fail. It also broke redmine. After a chmod 644 it works fine, but that doesnt stay upon reboot. So my question. why is this? I see no security risk because... i mean.. wanna steal some random data? How can I "fix" it? The servers are isolated and used by only one application, thats why I use openvz. I think about something like a runlevel script or so... but how do I do it efficiently? Maby with dpkg or apt? The same goes vor /dev/shm. in this case i totally understand why its not accessible, but I assume I can "fix" it the same way to fix /dev/urandom

    Read the article

  • File upload folder permission fastCGI - How to make it writeable?

    - by user6595
    I am using centos 5.7 with cPanel WHM running fastcgi/suEXEC I am trying to make a particular folder writable to allow a script to upload files but seem to be having problems. The folder (and all recursive folders) I want to be writable is: /home/mydomain/public_html/uploads And I want only scripts run by the user "songbanc" to be able to write to this directory. I have tried the following: chown -R songbanc /home/mydomain/public_html/uploads chmod -R 755 /home/mydomain/public_html/uploads But it still doesn't seem to work. The script will only upload files if I set the permissions manually via FTP client to 777. I assume I am misunderstanding how to set permission for users with fastcgi and hopefully someone can help me. Thanks in advance EDIT: Running getfacl on one of the scripts or folders gives the following: # file: home/mydomain/public_html/ripples/1.jpg # owner: songbanc # group: songbanc So it appears that the owner is correct? I'm now totally confused! EDIT 2: The plot thickens... lsattr and chattr are returning Inappropriate ioctl for device While reading flags on...

    Read the article

  • How do you get linux to honor setuid directories?

    - by Takigama
    Some time ago while in a conversation in IRC, one user in a channel I was in suggested someone setuid a directory in order for it to inherit the userid on files to solve a problem someone else was having. At the time I spoke up and said "linux doesn't support setuid directories". After that, the person giving the advice showed me a pastebin (http://codepad.org/4In62f13) of his system honouring the setuid permission set on a directory. Just to explain, when i say "linux doesnt support setuid directories" what I mean is that you can go "chmod u+s directory" and it will set the bit on the directory. However, linux (as i understood it) ignores this bit (on directories). Try as I might, I just cant quite replicate that pastebin. Someone suggested to me once that it might be possible to emulate the behaviour with selinux - and playing around with rules, its possible to force a uid on a file, but not from a setuid directory permission (that I can see). Reading around on the internet has been fairly uninformative - most places claim "no, setuid on directories does not work with linux" with the occasional "it can be done under specific circumstances" (such as this: http://arstechnica.com/etc/linux/2003/linux.ars-12032003.html) I dont remember who the original person was, but the original system was a debian 6 system, and the filesystem it was running was xfs mounted with "default,acl". I've tried replicating that, but no luck so far (tried so far with various versions of debian, ubuntu, fedora and centos) Can anyone clue me in on what or how you get a system to honor setuid on a directory?

    Read the article

  • How to reduce memory consumption an AWS EC2 t1.micro instance (free tier) ubuntu server 14.04 LTS EBS

    - by CMPSoares
    Hi I'm working on my bachelor thesis and for that I need to host a node.js web application on AWS, in order to avoid costs I'm using a t1.micro instance with 30GB disk space (from what I know it's the maximum I get in the free tier) which is barely used. But instead I have problems with memory consumption, it's using all of it. I tried the approach of creating a virtual swap area as mentioned at Why don't EC2 ubuntu images have swap? with these commands: sudo dd if=/dev/zero of=/var/swapfile bs=1M count=2048 && sudo chmod 600 /var/swapfile && sudo mkswap /var/swapfile && echo /var/swapfile none swap defaults 0 0 | sudo tee -a /etc/fstab && sudo swapon -a But this swap area isn't used somehow. Is something missing in this approach or is there another process of reducing the memory consumption in these type of AWS instances? Bottom-line: This originates server freezes and crashes and that's what I want to stop either by using the swap, reducing memory usage or both.

    Read the article

  • java Processbuilder - exec a file which is not in path on OS X

    - by Jakob
    Okay i'm trying to make ChucK available in exported Processing sketches, i.e. if i export an app from Processing, the ChucK VM binary will be executed from inside the app. So as a user of said app you don't need to worry about ChucK being in your path at all. Right now i'm generating and executing a bash script file, but this way i don't get any console output from ChucK back into Processing: #!/bin/bash cd "[to where the Chuck executable is located]" ./chuck --kill killall chuck # just to make sure ./chuck chuckScript1.ck cuckScriptn.ck then Process p = Runtime.getRuntime().exec("chmod 777 "+scriptPath); p = Runtime.getRuntime().exec(scriptPath); This works but i want to run ChucK directly from Processing instead, but can't get it to execute: String chuckPath = "[folder in which the chuck executable is located]" ProcessBuilder builder = new ProcessBuilder (chuckPath+"/chuck", "test.ck"); final Process process = builder.start(); InputStream is = process.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line; while((line = br.readLine()) != null) println(line); println("done chuckin'! exitValue: " + process.exitValue()); Sorry if this is newbie style :D

    Read the article

  • PackageMaker install script for rxtx

    - by vinzenzweber
    I am using PackageMaker to create an installer for my application. During installation I need to run a bash script to properly install rxtx, a JNI library for serial port communication. This library needs to have the directory /var/lock in place with user "root" and group "uucp". The installation script also needs to add the current user to the group "uucp" for the lib to be able to write to /var/lock. Now when I run my application installer the preinstall script is run as root. Therefore "whoami" returns root instead of the user who is actually running the installer. The result is that rxtx is not able to create lock files in /var/lock because the actual user was not added as a member to "uucp". How can I get the user while my script is run by the installer. Or is it better to set the permissions for /var/lock to a different group maybe? Any suggestions are welcome! !/bin/sh curruser=whoami logger "Setting permissions for /var/lock for user $curruser!" if [ ! -d /var/lock ] then logger "Creating /var/lock!" sudo mkdir /var/lock fi sudo chgrp uucp /var/lock sudo chmod 775 /var/lock MacOSX 10.5 and later use dscl if [ sudo dscl . -read /Groups/uucp GroupMembership | grep $curruser | wc -l = "0" ] then logger "Add user $curruser to /Groups/uucp!" sudo dscl . -append /Groups/uucp GroupMembership $curruser # to revert use: # sudo dscl . -delete /Groups/uucp GroupMembership $curruser else logger "GroupMembership of /var/lock not changed!" fi

    Read the article

  • Unable to set variables in bash script in Mac OSX

    - by cohortq
    Hello! I am attempting to automate moving files from a folder to a new folder automatically every night using a bash script run from applescript on a schedule. I am attempting to write a bash script on Mac OSX, and it keeps failing. In short this is what I have (all my ECHOs are for error checking): !/bin/bash folder = "ABC" useracct = 'test' day = date "+%d" month = date "+%B" year = date "+%Y" folderToBeMoved = "/users/$useracct/Documents/Archive/Primetime.eyetv" newfoldername = "/Volumes/Media/Network/$folder/$month$day$year" ECHO "Network is $network" $network ECHO "day is $day" ECHO "Month is $month" ECHO "YEAR is $year" ECHO "source is $folderToBeMoved" ECHO "dest is $newfoldername" mkdir $newfoldername cp -R $folderToBeMoved $newfoldername if [-f $newfoldername/Primetime.eyetv]; then rm $folderToBeMoved; fi Now my first problem is that I cannot set variables at all. Even literal ones where I just make it equal some literal. All my echos come out blank. I cannot grab the day, month, or year either,it comes out blank as well. I get an error saying that -f is not found. I get an error saying there is an unexpected end of file. I made the file and did a chmod u+x scriptname.sh I'm not sure why nothing is working at all. I am very new to this bash script on OSX, and only have experience with windows vbscript. Any help would be great, thanks!

    Read the article

  • Automatically stashing

    - by Readonly
    The section Last links in the chain: Stashing and the reflog in http://ftp.newartisans.com/pub/git.from.bottom.up.pdf recommends stashing often to take snapshots of your work in progress. The author goes as far as recommending that you can use a cron job to stash your work regularly, without having to do a stash manually. The beauty of stash is that it lets you apply unobtrusive version control to your working process itself: namely, the various stages of your working tree from day to day. You can even use stash on a regular basis if you like, with something like the following snapshot script: $ cat <<EOF > /usr/local/bin/git-snapshot #!/bin/sh git stash && git stash apply EOF $ chmod +x $_ $ git snapshot There’s no reason you couldn’t run this from a cron job every hour, along with running the reflog expire command every week or month. The problem with this approach is: If there are no changes to your working copy, the "git stash apply" will cause your last stash to be applied over your working copy. There could be race conditions between when the cron job executes and the user working on the working copy. For example, "git stash" runs, then the user opens the file, then the script's "git stash apply" is executed. Does anybody have suggestions for making this automatic stashing work more reliably?

    Read the article

  • CentOS - Convert Each WAV File to MP3/OGG

    - by Benny
    I am trying to build a script (I'm pretty new to linux scripting) and I can't seem to figure out why I'm not able to run this script. If I keep the header (#!/bin/sh) in, I get the following: -bash: /tmp/ConvertAndUpdate.sh: /bin/sh^M: bad interpreter: No such file or directory If I take it out, I get the following: 'tmp/ConvertAndUpdate.sh: line 2: syntax error near unexpected token `do 'tmp/ConvertAndUpdate.sh: line 2: `do Any ideas? Here is the full script: #!/bin/sh for file in *.wav; do mp3=$(basename .$file. .wav).mp3; #echo $mp3 nice lame -b 16 -m m -q 9 .resample 8 .$file. .$mp3.; touch .reference .$file. .$mp3.; chown apache.apache .$mp3.; chmod 600 .$mp3.; rm -f .$file.; mv .$file. /converted; sql="UPDATE recordings SET IsReady=1 WHERE Filename='${file%.*}'" echo $sql | mysql --user=me --password=pasword Recordings #echo $sql done

    Read the article

  • script to find "deny" ACE in ACLs, and remove it

    - by Tom
    On my 100TB cluster, I need to find dirs and files that have a "deny" ACE within their ACL, then remove that ACE on each instance. I'm using the following: # find . -print0 | xargs -0 ls -led | grep deny -B4 and get this output (partial, for example only) -r--rw---- 1 chris GroupOne 4096 Mar 6 18:12 ./directoryA/fileX.txt OWNER: user:chris GROUP: group:GroupOne 0: user:chris allow file_gen_read,std_write_dac,file_write_attr 1: user:chris deny file_write,append,file_write_ext_attr,execute -- -r--rwxrwx 1 chris GroupOne 14728221 Mar 6 18:12 ./directoryA/subdirA/fileZ.txt OWNER: user:chris GROUP: group:GroupOne 0: user:chris allow file_gen_read,std_write_dac,file_write_attr 1: user:chris deny file_write,append,file_write_ext_attr,execute -- OWNER: user:bob GROUP: group:GroupTwo 0: user:bob allow dir_gen_read,dir_gen_write,dir_gen_execute,std_write_dac,delete_child,object_inherit,container_inherit 1: group:GroupTwo allow std_read_dac,std_write_dac,std_synchronize,dir_read_attr,dir_write_attr,object_inherit,container_inherit 2: group:GroupTwo deny list,add_file,add_subdir,dir_read_ext_attr,dir_write_ext_attr,traverse,delete_child,object_inherit,container_inherit -- As you can see, depending on where the "deny" ACE is, I can see/not-see the path. I could increase the -B value (I've seen up to 8 ACEs on a file) but then I would get more output to distill from... What I need to do next is extract $ACENUMBER and $PATHTOFILE so that I can execute this command: chmod -a# $ACENUMBER $PATHTOFILE Additional issue is that the find command (above) gives a relative path, whereas I need the full path. I guess that would need to be edited somehow. Any guidance on how to accomplish this?

    Read the article

  • Error in {% markdown %} filter in Django Nonrel

    - by Robert Smith
    I'm having trouble using Markdown in Django Nonrel. I followed this instructions (added 'django.contrib.markup' to INSTALLED_APPS, include {% load markup %} in the template and use |markdown filter after installing python-markdown) but I get the following error: Error in {% markdown %} filter: The Python markdown library isn't installed. In this line: /path/to/project/django/contrib/markup/templatetags/markup.py in markdown they will be silently ignored. """ try: import markdown except ImportError: if settings.DEBUG: raise template.TemplateSyntaxError("Error in {% markdown %} filter: The Python markdown library isn't installed.") ... return force_unicode(value) else: # markdown.version was first added in 1.6b. The only version of markdown # to fully support extensions before 1.6b was the shortlived 1.6a. if hasattr(markdown, 'version'): extensions = [e for e in arg.split(",") if e] It seems obvious that import markdown is causing the problem but when I run: $ python manage.py shell >>> import elementtree >>> import markdown everthing works alright. Running Markdown 2.0.3, Django 1.3.1, Python 2.7. UPDATE: I thought maybe this was an issue related to permissions, so I changed my project via chmod 777 -R, but it didn't work. Ideas? Thanks!

    Read the article

  • ISP Config 3 - squirrel login error & how to add an smtp server for sending mails

    - by A Prasetyo
    Hi, Case #1: I have ISPConfig3 running, sending email through telnet server.mydomain.com 25 are possible. Receiving email also possible. BUT!! problem occurs when I try to login to squirrel... I've been awaken for 2 days now and still couldn't figured out why logging in into squirrel always having an error: ERROR: Connection dropped by IMAP server. here is the /var/log/mail.log: Jun 3 00:23:27 server-01 imapd: Connection, ip=[::ffff:127.0.0.1] Jun 3 00:23:27 server-01 imapd: chdir /var/vmail/mydomain.com/info: Permission denied Jun 3 00:23:27 server-01 imapd: [email protected]: Permission denied I did chmod 777 & still doesn't work, only another message appeared Jun 3 00:24:28 server-01 imapd: Connection, ip=[::ffff:127.0.0.1] Jun 3 00:24:28 server-01 imapd: [email protected]: Account's mailbox directory is not owned by the correct uid or gid Try to do telnet to IMAP port telnet mydomain.com 143 Trying 63.105.102.48... Connected to mydomain.com. Escape character is '^]'. OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc. See COPYING for distribution information. login [email protected] mypassword login NO Error in IMAP command received by server. and give no result... -_- I checked mysql.sock, I checked username and password in mysql db, everything is correct.. anyone can help? PLEASE?! Case #2: Does anyone know how to set or to view SMTP settings in ISPConfig 3? thank you..

    Read the article

  • I have this code .... Ethical Hacking

    - by kmitnick
    hello folks, I am following this EBook about Ethical Hacking, and I reached the Linux Exploit Chapter, this is the code with Aleph's 1 code. //shellcode.c char shellcode[] = //setuid(0) & Aleph1's famous shellcode, see ref. "\x31\xc0\x31\xdb\xb0\x17\xcd\x80" //setuid(0) first "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b" "\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd" "\x80\xe8\xdc\xff\xff\xff/bin/sh"; int main() { //main function int *ret; //ret pointer for manipulating saved return. ret = (int *)&ret + 2; //setret to point to the saved return //value on the stack. (*ret) = (int)shellcode; //change the saved return value to the //address of the shellcode, so it executes. } I give this the super user privileges, with chmod u+s shellcode as a super user, then go back to normal user with su - normal_user but when I run ./shellcode I should be a root user but instead I still be normal_user so any help?? btw I am working on BT4-Final, I turned off the ASLR, and running BT4 in VMWare...

    Read the article

  • PHP and Gettext not work on my server!

    - by NeoNmaN
    i have this site ( http://rssbot.dk/en/ ) i try to get gettext to work so my english, sweiden and norway site can comming up. Bot i can't get it to work, what have i doe wrong? this is my config code // define constants ( defualt - danish ) $lang = 'da_DA'; $lang_short = ''; $lang_prefix = 'da'; if ( isset( $_GET['lang'] ) ) { switch( $_GET['lang'] ) { case 'en': $lang = 'en_EN'; $lang_short = 'en/'; $lang_prefix = 'en'; break; case 'se': $lang = 'se_SE'; $lang_short = 'se/'; $lang_prefix = 'se'; break; case 'no': $lang = 'no_NO'; $lang_short = 'no/'; $lang_prefix = 'no'; break; } } define( 'LANG', $lang_short ); define( 'LANG_PREFIX', $lang_prefix ); putenv("LC_ALL=". $lang ); bindtextdomain('messages', ROOT .'lang/'); and my path is /var/www/rssbot.dk/lang/ folder. shut i make chmod right or? i hob to can be helpet

    Read the article

  • why it is not possible to modify file in a directory, where i have read/write group rights

    - by sighter
    I am currently messing around on my linux system and now i have the following situation. The directory /srv/http has the following permissions set: drwxrwxr-x 2 root httpdev 80 Jun 13 11:48 ./ drwxr-xr-x 6 root root 152 Mar 26 13:56 ../ -rwxrwxr-x 1 root httpdev 8 Jun 13 11:48 index.html* I have created the group httpdev before with the command: groupadd httpdev and added my user sighter with: gpasswd -a sighter httpdev Then i have set the permissions as above using the chown and chmod commands. But now i am not allowed to modify the index.html file or create a new file, as user sighter ,with touch like that: <sighter [bassment] ~http> touch hallo.php touch: cannot touch `hallo.php': Permission denied What do I understand wrong. I was expecting that i can do what i want there then the group has all the rights. The following Output is for your in formation. <sighter [bassment] ~http> cat /etc/group | grep sighter ... httpdev:x:1000:sighter ... The used linux-distro is archlinux. Thanks for all answers :) greetz Sascha

    Read the article

  • Getting Hprof dump for other processes from application code

    - by Natarajan
    Hi, In my application , i have an option to capture the hprof dump. I used android.os.Debug.dumpHprofData (String fileName) Initially i though the hprof data generated by the method above is for the entire device , which is not so . The hprof data generated is only for my process. Now i am trying to generate hprof data for other process as well. I need to get the Hprof dump for all the running processes from application code. from adb shell i tried "kill -10 " , This command will generate the hprof file for the corresponding process in the data/misc folder. Now the problem is this command is working perfectly from the adb shell prompt , but i am not able to embed the command to mycode. My code is like Runtime.getRuntime().exec("chmod 777 /data/misc") Runtime.getRunTime().exec("kill -10 ") No exceptions are thrown , but somehow it is not working. The same code above is capturing Hprof dump for my process, when i give my process ID. I tried with "android.os.Process.sendSignal (int pid, android.os.Process.SIGNAL_USR1) ;" also.Getting the same problem.It is capturing Hprof dump for my process. For other processes it is not working. Do we need to have any special permission to kill other process from our process ? Or is it a built issue ? can you please suggest some possible way to get Hprof dump for other processes from application code? Thanks

    Read the article

  • Advantages of Using Linux as primary developer desktop

    - by Nick N
    I want to get some input on some of the advantages of why developers should and need to use Linux as their primary development desktop on a daily basic as opposed to using Windows. This is particulary helpful when your Dev, QA, and Production environments are Linux. The current analogy that I keep coming back to is. If I build my demo car as a Ford Escort, but my project car is a Ford Mustang, it doesn't make sense at all. I'm currently at an IT department that allows dual boot with Windows and Linux, but some run Linux while the vast majority use Windows. Here's several advantages that I've came up with since using Linux as a primary desktop. Same Exact operating system as Dev, QA, and Production Same Scripts (.sh) instead of maintaining (.bat and *.sh). Somewhat mitigated by using cygwin, but still a bit different. Team learns simple commands such as: cd, ls, cat, top Team learns Advanced commands like: pkill, pgrep, chmod, su, sudo, ssh, scp Full access to installs typically for Linux, such as RPM, DEB installs just like the target environments. The list could go on and on, but I want to get some feedback of anything that I may have missed, or even any disadvantages (of course there are some). To me it makes sense to migrate an entire team over to using Linux, and using Virtual Box, running Windows XP VM's to test functional items that 95% of most of the world uses. This is similar but a little different thread going on here as well. link text

    Read the article

  • Problem with filefield module after migrating drupal site to a new server: cant upload files

    - by oalo
    We have a content type with two imagefield / filefield fields, and after migrating our site to a new server, we have the following problem: When we submit a new item for this content type, with two images for those fields, drupal gives us the following error and does not upload the images: warning: fopen(sites/default/files/.htaccess) [function.fopen]: failed to open stream: Permission denied in /websites/sitename/data/sites/all/modules/filefield/field_file.inc on line 349. warning: fopen(sites/default/files/.htaccess) [function.fopen]: failed to open stream: Permission denied in /websites/sitename/data/sites/all/modules/filefield/field_file.inc on line 349. An image thumbnail was not able to be created. warning: fopen(sites/default/files/.htaccess) [function.fopen]: failed to open stream: Permission denied in /websites/sitename/data/sites/all/modules/filefield/field_file.inc on line 349. warning: fopen(sites/default/files/.htaccess) [function.fopen]: failed to open stream: Permission denied in /websites/sitename/data/sites/all/modules/filefield/field_file.inc on line 349. An image thumbnail was not able to be created. I understand this is a permissions error, but it is not clear to me where do I have to change permissions. Line 349 of file.inc has the following code: if (($fp = fopen("$directory/.htaccess", 'w')) && fputs($fp, $htaccess_lines)) { fclose($fp); chmod($directory .'/.htaccess', 0664); } else { $repl = array('%directory' = $directory, '!htaccess' = nl2br(check_plain($htaccess_lines))); form_set_error($form_item, t("Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines:!htaccess", $repl));

    Read the article

  • Image upload - Latin chars problem

    - by Holian
    Dear Gods! I use this script to upload images to serveR: <?php if (($_FILES["image_upload_box"]["type"] == "image/jpeg" || $_FILES["image_upload_box"]["type"] == "image/pjpeg" && ($_FILES["image_upload_box"]["size"] < 2000000)) { $max_upload_width = 450; $max_upload_height = 450; if(isset($_REQUEST['max_width_box']) and $_REQUEST['max_width_box']!='' and $_REQUEST['max_width_box']<=$max_upload_width){ $max_upload_width = $_REQUEST['max_width_box']; } if(isset($_REQUEST['max_height_box']) and $_REQUEST['max_height_box']!='' and $_REQUEST['max_height_box']<=$max_upload_height){ $max_upload_height = $_REQUEST['max_height_box']; } if($_FILES["image_upload_box"]["type"] == "image/jpeg" || $_FILES["image_upload_box"]["type"] == "image/pjpeg"){ $image_source = imagecreatefromjpeg($_FILES["image_upload_box"]["tmp_name"]); } $remote_file =$directory."/".$_FILES["image_upload_box"]["name"]; imagejpeg($image_source,$remote_file,100); chmod($remote_file,0644); list($image_width, $image_height) = getimagesize($remote_file); if($image_width>$max_upload_width || $image_height >$max_upload_height){ $proportions = $image_width/$image_height; if($image_width>$image_height){ $new_width = $max_upload_width; $new_height = round($max_upload_width/$proportions); } else{ $new_height = $max_upload_height; $new_width = round($max_upload_height*$proportions); } $new_image = imagecreatetruecolor($new_width , $new_height); $image_source = imagecreatefromjpeg($remote_file); imagecopyresampled($new_image, $image_source, 0, 0, 0, 0, $new_width, $new_height, $image_width, $image_height); imagejpeg($new_image,$remote_file,100); imagedestroy($new_image); } imagedestroy($image_source); }else{ something.... } ?> This is works well, till i upload a photo with latin chars in filename. For example the filename: kék hegyek.jpg. After upload file name will be: KA©k hegyek.jpg How can i solve this? Thank you

    Read the article

  • PEAR:DB connection parameters

    - by Markus Ossi
    I just finished my first PHP site and now I have a security-related question. I used PEAR:DB for the database connection and made a separate parameter file for it. How should I hide this parameter file? I found a guide (http://www.kitebird.com/articles/peardb.html) that says: Another way to specify connection parameters is to put them in a separate file that you reference from your main script. ... It also enables you to move the parameter file outside of the web server's document tree, which prevents its contents from being displayed literally if the server becomes misconfigured and starts serving PHP scripts as plain text. I have now put my file in a directory like this /include/db_parameters.inc However, if I go to this URL, the web server shows me the contents of the file including my database username and password. From what I've understood, I should protect this file so, that even though PHP would be served as text, nobody could read this. What does outside of web server's document tree mean here? Put the PHP file out of public_html directory altogether deeper into the server file system? Some CHMOD?

    Read the article

  • problem creating jpg thumb with php

    - by Ross
    Hi, I am having problems creating a thumbnail from an uploaded image, my problem is (i) the quality (ii) the crop http://welovethedesign.com.cluster.cwcs.co.uk/phpimages/large.jpg http://welovethedesign.com.cluster.cwcs.co.uk/phpimages/thumb.jpg If you look the quality is very poor and the crop is taken from the top and is not a resize of the original image although the dimesions mean it is in proportion. The original is 1600px wide by 1100px high. Any help would be appreciated. $thumb = $targetPath."Thumbs/".$fileName; $imgsize = getimagesize($targetFile); $image = imagecreatefromjpeg($targetFile); $width = 200; //New width of image $height = 138; //This maintains proportions $src_w = $imgsize[0]; $src_h = $imgsize[1]; $thumbWidth = 200; $thumbHeight = 138; // Intended dimension of thumb // Beyond this point is simply code. $sourceImage = imagecreatefromjpeg($targetFile); $sourceWidth = imagesx($sourceImage); $sourceHeight = imagesy($sourceImage); $targetImage = imagecreate($thumbWidth,$thumbHeight); imagecopyresized($targetImage,$sourceImage,0,0,0,0,$thumbWidth,$thumbWidth,imagesx($sourceImage),imagesy($sourceImage)); //imagejpeg($targetImage, "$thumbPath/$thumbName"); imagejpeg($targetImage, $thumb); chmod($thumb, 0755);

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30  | Next Page >