Programming :: Root Permission For Bash Script?

Aug 31, 2010

I am trying to write a script that will create a directory, copy files to it, zip them, move the zip file to the desktop and clean up.However, when I run the script, it comes back stating that I do not have permission to make the directory. I wanted to know how to add the permission into the script to allow for access to whoever runs the script to pull the logs, but won't leave the system in the root user?here is what I have for code so far:

#!/bin/bash
host= 'hostname'
mkdir /home/savelogs

[code]....

View 1 Replies


ADVERTISEMENT

Programming :: Remove Line Containing Certain Variable - Bash - Permission Denied?

Jul 20, 2011

I am writing a bash script to run everyday and output results to a file. When the same results are produced i want to overwrite the line from the previous day. (Or remove and add). So if the script finds a variable in a line. i want it to output the results to that line . sed -i did not work for me; sed: couldn't open temporary file ./sedTvOCEg: Permission denied

View 10 Replies View Related

Ubuntu Security :: Giving Root Permission To An Application But Without Running It As Root?

Jan 20, 2011

want to run VirtualBox with root permissions. Trouble is that only when run as root i can access attached USB devices inside of a virtual machine, otherwise, these a greyed out).Now running VirtualBox as a root user also changes the configuration folders, making all my virtual machines already defined disappear. I also don't want to copy all to the root configuration folders. Is there a way to give the VirtualBox root permissions but without actually running the application as a root user. Is it possible to do without changing the permissions of the non-root user, i.e. i don't want my user to have all root permissions, due to security considerations.

View 1 Replies View Related

Fedora :: Root File Permission Accidentally Changed Root To 700

Mar 24, 2010

the terminal and logged in as root i was changing file permissions and happened to change the root folder to 700. Now my icons have gone and i can't even access the terminal.

I was just wondering if it is possible to go to rescue mode using the cd and restore all the appropriate file permissions to root/ users if possible

View 4 Replies View Related

Ubuntu :: Bash: Permission Denied

Mar 27, 2010

I tried to execute the following command: $ ./eval_online_wiki.ml -db_user aa -db_pass bb -db_name cc It returned as follows: bash: ./eval_online_wiki.ml: Permission denied What does this mean? How to solve the problem? Actually, I was following a README, and it says "$ ./eval_online_wiki -db_user <username> -db_pass <pwd> -db_name <db_name>"

View 2 Replies View Related

CentOS 5 :: -bash: /dev/st0: Permission Denied?

Jan 2, 2009

I'm trying to run a backup using CPIO to an LTO2 tape in an HP Ultrium 460 drive using the following:find / -path /proc -prune -o -print | cpio -o -H crc --block-size=128 > /dev/st0Each time I get the error:-bash: /dev/st0: Permission deniedThis is regardless of whether I sudo the two sides of the command or not. I have used dd if=/dev/st0 of=/tmp/test.file ibs=128k count=1 to verify the blocksize (and since I was a little confused about block-size in cpio I also tried --block-size=256)

View 5 Replies View Related

Fedora :: Could Not Exec /bin/bash Permission Denied?

Sep 24, 2010

trouble when I log in the fedora as a normal user(not root) today. When I fill the username and the password press enter key. Then pop up a little window locate at topleft corner. And have one line message : "/usr/bin/xterm : Could not exec /bin/bash : Permission Denied"hen I log in as root, it's ok. And when I open shell and type "su username" then the console print "su: /bin/bash: Permission denied"I have checked the perms of "/bin/bash" , it's 755. And I have tried all things which suggested from articles searched through Google. like change / or /root and other directory's permissions but failed

View 4 Replies View Related

General :: Bash: /etc/ld.so.conf: Permission Denied?

Sep 10, 2010

If I run this as su I get the same thing. If I log on as root user It is the same as well

View 5 Replies View Related

General :: -bash: ./PE1650_RAID_FRMW_LX_R168387.BIN: Permission Denied?

Aug 24, 2010

[root@mail tmp]# ./PE1650_RAID_FRMW_LX_R168387.BIN-bash: ./PE1650_RAID_FRMW_LX_R168387.BIN: Permission deniedalso get it when trying to run[root@mail tmp]# ./ESM_FRMW_LX_A37_R117418.BIN-bash: ./ESM_FRMW_LX_A37_R117418.BIN: Permission denied

View 2 Replies View Related

General :: Can't Change Permission For Bash.bashrc File?

May 28, 2010

I tried following the example from here (http:url]......)Open up publicity.html for reading and writing by anyone.

Before: -rw-r--r-- publicity.html
Command: chmod og=rw publicity.html
After: -rw-rw-rw- publicity.html

Here's my terminal session:

username@ubuntu:/etc$ -rw-r--r-- bash.bashrc
-rw-r--r--: command not found
username@ubuntu:/etc$ chmod og=rw bash.bashrc[code]....

View 2 Replies View Related

Ubuntu :: Bash: /proc/sys/vm/drop_caches: Permission Denied

Aug 10, 2010

I've been using Digikam and it's a huge blow to my system memory. Even after quitting I still feel my computer to be slightly slower. I tried running the commands from [URL] but I get this instead

bash: /proc/sys/vm/drop_caches: Permission denied

View 4 Replies View Related

General :: New DSL Install - Reboot - Now -bash Permission Denied ?

Dec 16, 2009

Firstly, i'm NEW to Linux and my very first time with DSL. I'm installing this on an older Dell Latitude laptop.

I just finally got the DSL installed on my HDD successfully and then I added feh to start and run at start up, then I rebooted and now i'm getting this error:
No, directory, logging in with HOME=/ -bash: cd: /home/dsl: Permission denied

I have tried reading numerous websites but none explains to the level whereby I can understand. I even tried rebooting from the CD, but could not figure out how/what to do next?

The question is, can someone explain how I can use the DSL CD to try to correct this error. More importantly, can you explain in layman terms so that I can actually put it good use.

Also, some additional questions I have....when you download a file where does it save to?

View 6 Replies View Related

General :: /usr/bin/xterm: Could Not Exec /bin/bash: Permission Denied

Sep 24, 2010

I'm in trouble when I log in the fedora as a normal user(not root) today. When I fill the username and the password press enter key. Then pop up a little window locate at top left corner. And have one line message : "/usr/bin/xterm : Could not exec /bin/bash : Permission Denied" Then I log in as root, it's ok. And when I open shell and type "su username" then the console print "su: /bin/bash: Permission denied" I have checked the perms of "/bin/bash" , it's 755. And I have tried all things which suggested from articles searched through Google. like change / or /root and other directory's permissions but failed.

Code:

[root@localhost lib]# ldd /bin/bash
linux-gate.so.1 => (0x00687000)
libtinfo.so.5 => /lib/libtinfo.so.5 (0x05846000)

[code]....

View 2 Replies View Related

General :: Always Ask For Root Permission?

Apr 2, 2011

I recently installed a printer on my OpenSuse 11,2. Now every time i start the computer it prompts for the root password.

In the window that pops up it states

/opt/Xerox/PSULauncher: session followd by a long string of letters and numbers.

There is a script "uninstall.sh" in the PSULauncher directory that i ran but it didn't fix the problem.

View 1 Replies View Related

Programming :: Bash: Printing The Line Number In Bash Script?

Feb 4, 2011

I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.

View 3 Replies View Related

Programming :: Bash Ctrl+c Tarp And Bash Read With Timeout?

Jan 24, 2010

simple bash code:

Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do

[Code]...

How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!

View 10 Replies View Related

General :: -bash: /home/rb27/.bash_profile: Permission Denied

Sep 9, 2011

I have tried changing permissions and I have looked for a solution, but the error still exists.In fact it gives me a different error every time I log in.

Could not chdir to home directory /home/rb27: Permission denied

here is a snippet of what I get when I use the command ls -al:

drwxr-xr-x 16 root root 0 Sep 8 18:28 .
drwxr-xr-x 23 root root 4096 Feb 5 2011 ..
d????????? ? ? ? ? ? ajd74
d????????? ? ? ? ? ? ban45
d????????? ? ? ? ? ? rb27

I cannot log in as root since the permission is denied

View 1 Replies View Related

General :: Permission Denied As The Root

Mar 23, 2011

The root user of Linux doesn't have permission to read/write a regular file, unless all users have permission to read/write this file, like below:

drwxrwsrwx ....... file_name

However the owner of the file can still read/write this file.

AND:

0) not the problem of execution, just read/write
1) not the problem of device because regular user can read/write it.
2) the result of command id:

uid=0(root) gid=0(root) groups=0(root)

so I don't think it's the problem of group.

View 2 Replies View Related

General :: Why Would Only Root Have Permission To Mount Something

Apr 22, 2010

I understand at least some of the advantages of this multi-user set-up, but why would you have to become root to stick a DVD in the machine? I suppose I could go into root and chmod the mount command, but - why would it have been set up that way at all? Is it paranoia?

View 5 Replies View Related

CentOS 5 :: Change Permission Of Root?

Mar 2, 2009

When I installed Centos 5, it asked me password twice. One is to root, another is a user acount.

Right now, I want to do "cd /root" under my user acount. It responds me:

permission denied.

Can I change permission of root?

View 7 Replies View Related

Programming :: Reading A Bash Variable In Bash Scripting ?

Nov 26, 2008

I have a config file that contains:

my.config:

Code:

Now in my bash script, I want to get the output /home/user instead of $HOME once read. So far, I have managed to get the $HOME variable but I can't get it to echo the variable. All I get is the output $HOME.

Here is my parse_cmd script:

Code:

View 3 Replies View Related

Programming :: Run Multiple Bash And Php Scripts From A Bash Script?

Jul 25, 2011

I have written quite a few separate bash & scripts and php scripts that up to now I have run from cron jobs. However I have to estimate how long each takes to run, before running the next and so it probably takes much longer than necessary to run them all. They have to run in order.

Now there are so many I am thinking it would be better to have a master bash script that would run one after the other, but I am not sure how to get the master script to wait before starting to run the next script. Is this possible and is there a command that will make the script wait between bash and php scripts , for them to finish, before running the next?

View 5 Replies View Related

CentOS 5 Hardware :: NTSF Mount - Bash: /dev/sda1: Permission Denied

Nov 5, 2009

I have tried to mount Sda on my laptop HP dv6 and I have got this problem [root@cpe-74-71-125-175 ~]# /dev/sda1 /mymount/win ntfs-3g rw,umask=0000,defaults 0 0 bash: /dev/sda1: Permission denied

View 3 Replies View Related

Fedora :: Suspend From Terminal Without Root Permission?

Aug 23, 2011

I'm running 2.6.35.14-95.fc14.i686 on Gnome 2.32.0. I've been trying to assign a keyboard shortcut to Suspend the system when activated, but it doesn't work because to suspend the system you need to be root. The command I've been using for the shortcut is terminal "pm-suspend".I don't wanna set up the working user as root. Is there any way to get around the root authentication while suspend to make the shortcut work?

View 4 Replies View Related

Ubuntu Security :: Can't Have Root Permission In Gnome

Oct 21, 2010

I can do easily sudo, gksu and gksudo in terminal, but when I click for update but in the software center:

screenshot1.png

and my password don't work I does this with update manager too

View 4 Replies View Related

Fedora Security :: How To Delete Folder Without Root Permission

Apr 23, 2009

I have a system in which I do not have root access to. On that system, I have my own directory which I share with other users. I am trying to clean it up when I noticed that there was a subdirectory created by another users in my group that I cannot delete. It has all the permissions set besides global write. How can I delete this folder without root permission? I can't even chmod or chown it.

View 3 Replies View Related

Fedora Installation :: Running As Root All The Permission Are +xrw And Still Does'nt Working?

Jun 15, 2009

(xcdroast:22631): WARNING **: Failed to access cdrecord. Please check the permissions and ownership of /usr/bin/cdrecordcdrecord is a link to wodim, i'm running as root all the permission are +xrw and still does'nt working

View 1 Replies View Related

OpenSUSE Network :: Traceroute - Permission Denied For Root

Apr 8, 2011

As root I get the following result: ngssuse:~ # traceroute -nI 10.200.123.45

Note: the -i and -I options were exchangedfor compability with LBL traceroute Use -I for ICMP, and -i <ifname> to specify the interface name unable to create ICMP send socket: Permission denied. Is this a bug?

View 5 Replies View Related

General :: Permission Denied While Copying Files With Root

May 8, 2011

How is it possible that I get perm denied when I'm copying files in console.

View 1 Replies View Related

Ubuntu Servers :: Root Permission Denied Errors When Using Apt

May 6, 2010

Just had a new VPS installed running Ubuntu Server 8.04 Getting some errors when I connect to the server and try to use apt.. only trying to install nano and after messing around I've managed to get the error to change.. but still can't get any further.

error

Code:

# sudo apt-get install nano
Reading package lists... Done
Building dependency tree
Reading state information... Done

[code]....

View 4 Replies View Related







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