I have a file that I need to "protect" so that it cannot be copied! I am using Python on Windows XP.
I think it may just be changing file permissions??
I'm a Ubuntu Linux user (Lucid Lynx) who is running Apache. I have a collection of zip files in a folder in my home directory (~/zip_files) which I would like to be able to link to through apache, such that when somebody who visits my website which I'm using Apache to host clicks a link to one of the zip files, he can download it through the web. How can I provide Apache with access to the files and set the permissions? Thanks, I'm new to linux!
Back in the olden days, runlevel 3 was text mode and runlevel 5 was GUI mode. So if you wanted Linux to boot up in text mode, you would just set 3 as the initial runlevel and you're done.
Nowadays it seems that things are more complicated, and since I don't want to break anything, I ask:
What's the right way to get Ubuntu 9.10 to always boot up in multiuser text mode?
I have a user that I log in with over SFTP to my Ubuntu box. They have permission to write to the home directory of course. The external hard drive gets mounted to /media folder but I can't write to it over SFTP while logged in with that user. How would I set the permissions to allow me to write to the drive?
I have a text file looks like this :
100 50 20 90
4.07498 0.074984
37.1704 28.1704
20.3999 14.3999
48.627 35.627 ....
I need to edit this file so that everything is kept the same except the first line, 3rd item. The ouput should look like this:
100 50 19 90
4.07498 0.074984
37.1704 28.1704
20.3999 14.3999
48.627 35.627
....
How can I do it in c++ ? Can anybody help me?
Thanks,
Hoang
I just installed postgresql onto an ubuntu box.
How can I create user foo with password bar and database baz, so that foo owns baz?
foo is not a unix user.
This is the /etc/fstab entry of a raid system /dev/md4 that is controlled with mdadm and webmin on an ubuntu 10.04 64 server:
/dev/md4 /mnt/md4 ext3 relatime 0 0
We tried to switch off automatic forced fsck on rebotts, as we prefer to implement our own scheduled fsck routine by setting the last parameter of the line to 0 (ZERO).
But we found out the forced and automatic check still occurs on the underlying real disks, lets say sdb1 and sdc1.
How can we switch that off?
I want to change OpenJDK to SunJava in my ubuntu linux desktop , i have downloaded the "jdk-7.tar.gz" from sun's website, but there problem is how to make the system to use the newly downloaded java ? I tried adding the new jdk/bin/java to my PATH ( from .bashrc ) but that seem not to work (cause probably OpenJDK's path is inside my PATH variable as well , so the system checks that first)
Here's my JDK7 : /usr/lib/jdk7/bin/java
Here's what $(which java) outputs : /usr/bin/java
Thanks in advance
I am having this problem (apache2, ubuntu 12.04)
I have put all my sites in /home/username/vhosts folder
I have added permissions to home and username to be x and chmod -r 777 on vhosts
Added /etc/hosts to access my sites with desired names
Did a2enmod rewrite
But still I have this error:
[Sat Jun 23 00:05:23 2012] [crit] [client 127.0.0.1] (13)Permission denied: /home/username/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
WHY is it not readable? I did
sudo -s
su - www-data
and with that I can correctly list the /home/username dir
What is wrong with me or apache?
With a typical USB hard drive enclosure, is the full range of drive power management functionality available?
In what may be an unrelated matter: is it possible to suspend a PC without unmounting an attached USB-powered drive, and then remounting it on resume? This is the behaviour I'm currently seeing (running Ubuntu linux 10.10).
Are there certain models or brands that provide more complete control over this aspect of drive operation? My Friendly Neighbourhood Computer Store carries (part of) the Vantec Nexstar product line.
I want to replace postfix with exim4 on my Ubuntu test server to reflect the setup I have on my production server, but apt-get and aptitude (quite understandably) insist on removing several packages that depend upon having a mail stack.
However, in this case I am prepared to override apt-get's undoubted good sense as exim should fulfil all the requirements of the dependent packages, providing mail and sendmail functionality for my applications. I don't want to remove the dependent packages as there is months of effort invested and, although backed up, will be a pain to reconstruct properly.
Hey, I'd like to write to a text file to record a set of scores. However, everytime I write to it it overwrites what was originally in the file. Please can someone tell me how to not let it overwrite what is there or how to make it start writing in an empty space. Thank you in advance.
I am programming in C++ MFC, windows.
What is the best practice to get a file attribute(such as read only), and security attribute(such as read deny write deny) in windows XP, Vista, and Win7?
and What is the best practice to modify a file attribuute and security attribute?
Many thanks!!!
Which Linux server distribution the best to run lamp server for production environment?
1. sharing hosting
2. virtual hosting
3. dedicated hosting
(Ubuntu server, redhat,....)
Thanks,
Yosef
My Ubuntu 10.04 desktop has three versions of emacs:
emacs-snapshot (client)
emacs-snapshot (GTK)
GNU Emacs 23
I mostly use emacs-snapshot, but I also use regular emacs in terminal mode emacs -nw. However, it is not clear to me what the difference is between the client and GTK versions of emacs-snapshot is, which one is launched by emacs-snapshot at the terminal, and if I should uninstall one or just ignore it.
I have a new HP dv7t laptop. Can I find out what DPI this laptop supports so that I can set my Ubuntu settings? I think I got the resolution working right after I installed the proprietary driver for the Nvdia graphics card.
Thank you.
I want to get file size I'm doing this:
my $filename=$query->param("upload_file");
my $filesize = (-s $filename) ;
print "Size: $filesize ";
Yet it is not working.Note that I did not upload the file. I want to check its size before uploading it. so to limit it to max of 1 MB.
I'm using Evolution for reading my emails at my Ubuntu 9.10.
I would like to run a personalized command when it receives a mail, like checkgmail.
Example:
blink --scrolllockled --rate {number-of-new-mail}
Is it possible?
I ssh to a ubuntu sever, start a web project(Rails), then I can visit this project.
I close the the ssh terminal, then the project says can not find files(view pages,css files and so on).
I put the project in the home folder(/home/byht).
why?
When closing the ssh terminal, the user's folder can not be visited ?
You know, when I put the project in another folder(/usr/local), everything goes well.
I'm using git-svn in a svn environment. When i check out .sh files they do not get the +x flag. So i change that manually, but now git tells me the file has been modified.
My question is: If i'd stage + commit those +x changes, will git push them to the svn server when i "git svn dcommit"? This is not what i want, i just want git to 'memorize' the +x changes locally but not to try to send file permission changes to the svn repository.
This story starts with me taking my USB stick to work
and unplugging it by accident in the middle of a file transfer.
The USB stopped working completely, now I have Linux Ubuntu on my Laptop at home
So I tried messing around with Gparted and Fdisk and all it did
Was making my USB stick be partition less and 8 MB instead of 2GB
So instead of creating more havoc, I ask kindly for help.
I tried going to fdisk /dev/sdb
and inside there were no partitions, added a new one
but that didn't really do anything, /dev/sdb1 was none-existent..
I have an add-on called Flash-Aid in Firefox 4 on my Ubuntu build, but ever since Mozilla came up with their new UI, I haven't been able to figure out how to get add-ons to actually run within Firefox. Double clicking them just opens up a detail page about them and there are no options to run them. With most add-ons, this isn't a problem since they usually don't need to be explicitly run, but this one does. Can someone tell me how to do this?
Getting a kernel panic with this error on my XEN VPS's. (all on 8.04 LTS)
The kernel version on my Dom-0 is 2.6.24-25-xen and the kernel version on the Xen VPS is also 2.6.24-25-xen.
I read something about disabling APIC from here http://muffinresearch.co.uk/archives/2008/08/20/ubuntu-bug-soft-lockup-cpu0-stuck-for-11s/
but that doesn't seem to help as well.
Anyone experienced this and are there any workarounds?
Thanks in advance!
I installed Ubuntu 10.04 and got Empathy IM client configured. The icon on the panel next to the clock, n/w was not functioning as expected, so I accidentally removed it from the panel. Now I am unable to see the icon to show my contacts online. How do I add it back to the panel?