General :: Root User Using Freshclam Command Cannot Write To Directory?
Jun 27, 2010
When I log on a root and attempt to issue the command Freshclam to upgrade the virus definitions it attempts or create a new file with a definition name. I get a message stating that the directory isnt writable. The user and group access rights are as follows:
USER = read, write, execute
Group = read, write, execute
All= read, execute.
The only way I can get around this is by applying a 777 which would be read, write and execute for all. Now, I have a group define with several user ids in it including Root.How do I connect the group with the directory/file so I dont have to apply a 777 access right to group users could issue the Freshclam command.
View 1 Replies
ADVERTISEMENT
Mar 3, 2010
On my laptop for testing, I simply chown each subdir of /var/www to my myuser:www-data. But, now that I am setting up a public facing server, I'm wondering if this is the proper way to do so? If not, what is the best way to allow a non-root account to write to /var/www.
View 4 Replies
View Related
Aug 10, 2010
I need to give a user write access to /var/www and its subdirectories. The current directory permissions are as follows:rwx r-x r-x root root
I added the user to the root group but that didn't seem to help.I read I could chmod -R to change the access to write for the www directory and subdirectories but I don't want to change things and mess up the website. How can I give the user access to write to the www directory and subdirectories without messing anything up? Would changing the www directory group owner to his group cause an issue anywhere?
View 3 Replies
View Related
Nov 28, 2010
I am new to writing shell scripts. So, please bare with me. I am currently trying to write a shell script which will read the directory path as input from user and will traverse the Dir tree to find all available audio and video files. I have tried to write as much as I could but I don't know where I am making mistake as I get some files to be audio file which are actully tar balls. On the second note there are some files which video but script shows them to be audio. And, some video files are completely skipped. I am giving the shell script below so that you can see. I am using two external files as source which I am attaching.
Code:
#!/bin/bash
#Let's load the extensions that we want to search for
vdExt=$(cat vdExtList)
adExt=$(cat adExtList)
[code]....
View 5 Replies
View Related
Feb 27, 2010
I need to write a script to report useful information on disk utilization for each user's home directory.For each directory I need to show: 1. the long listing of that directory entry (but not the files in the directory), so that I can see the rights and owners of the directory.2. The amount of disk used by that directory, in human-readable format, including subdirectories. I need to have two lines for each user one after the other. For example:
/home/user1 directory info
/home/user1 disk usage
/home/user2 directory info
/home/user2 disk usage
The script will assume that all users, except user root, have their home directories in the /home directory (no need to do anything with the /etc/passwd file). And if the administrator adds or removes users, the script should still work correctly (so the script shows the information for all current users).
Here's what I do know. The command "ls -ld /home/user's_name" will give me the info I need for #1. And the command "du -hs" will give me the info I need for #2. What I don't know is how to grab each individual directory in order to apply the above commands to each of them in order. ???
View 14 Replies
View Related
Oct 5, 2010
For a user on a Linux host, I need to make everything inaccessible besides his home directory. I have heard that this is usually done by changing the root directory for the user (and setting it to the user's home directory), however I couldn't find the way to do it.
I thought about the chroot command, but it seems it just runs the specified command, considering the specified directory as the root directory. So it seems chroot is not what i need. So my question is: what is the command which changes the user's root directory?
View 7 Replies
View Related
Mar 21, 2010
I'm using ubuntu 9.10. I used the command:
root@aduait-laptop:~# sudo chown -R root:root /media/104B-FF96/Private to set the permissions of Private folder for root but it is giving error:
Code:
root@aduait-laptop:~# sudo chown -R root:root /media/104B-FF96/Private
chown: changing ownership of `/media/104B-FF96/Private/5.jpg': Operation not permitted
chown: changing ownership of `/media/104B-FF96/Private/6.jpg': Operation not permitted
chown: changing ownership of `/media/104B-FF96/Private/7.jpg': Operation not permitted
[Code].....
View 5 Replies
View Related
Oct 24, 2010
I am using fedora 13. If is use the command "cd //". It changes to root directory. How is it? What "//" denote?
View 6 Replies
View Related
Jan 8, 2010
So, i've a little question. I have a Linux Red Hat 5.1 System wich has a programm that needs to be started as a user -> usera .When i reboot the server, how can i make it possible to run a command in the shell as usera user?Someone told me, that this is not possible to make an autostart entry because this works only with the root account?!What i want its simple.- Command -> startprg need's to be started as user usera automatically after an automated reboot of the red hat linux
View 4 Replies
View Related
Feb 13, 2011
Or would this sacrifice security in some way? I've been using root only, and am ready to have a seperate account now. It's the dotfiles for GUI apps that I'm concerned about:
Code:
-rw------- 1 root root 98 Feb 13 16:23 .Xauthority
-rw------- 1 root root 6392 Feb 12 18:13 .bash_history
drwx------ 5 root root 4096 Jan 13 17:47 .config
drwxr-xr-x 4 root root 4096 Dec 29 21:36 .fvwm
drwx------ 4 root root 4096 Nov 7 19:55 .mozilla
-rw------- 1 root root 218 Jan 26 10:04 .recently-used.xbel
-rw------- 1 root root 98 Feb 13 16:23 .serverauth.17096
drwxr-xr-x 2 root root 4096 Dec 25 12:42 .tuxcmd
drwxr-xr-x 2 root root 4096 Feb 12 17:25 .xine
View 11 Replies
View Related
Oct 26, 2010
I no longer have access to my root desktop. On a session I attempted to change the root username but i apparently assigned it a wrong directory that does not exist. When I rebooted with my new root username, i was instead recognised as a simple user (no root privileges). I tried the console to change to "old" root but root password is not accepted and there is no way to access to sudoer files. it seems that inserting a new username requires root privileges and i am back to square one. Simply logging with old root username and password after restart gives me a blank screen with nothing on it and cannot even reboot.
View 9 Replies
View Related
Apr 7, 2011
Why would rsync insert a user's home directory path in variable expansion when run via cron, but not when run manually. The gory details... Red Hat Enterprise Linux AS release 4 (Nahant Update 6) Linux 2.6.9-67.0.20.ELsmp The script (parts anyway, and simplified)...
Quote:
#!/bin/bash
. /home/bea/.bash_profile
echo rsyncloc=${rsyncloc} >> ${log}
[code]....
View 4 Replies
View Related
Aug 10, 2011
Is there a non-root shell command that can tell me if a user's account is disabled or not? note that there is a fine distinction between LOCKING and DISABLED:
LOCKING is where you prepend ! or * or !! to the password field of the /etc/passwd file. On Linux systems that shadow the passwords, this marker flag may be placed in /etc/shadow instead of /etc/passwd. Password locking can be done (at a shell prompt) via password -l username (as root) to lock the account of username, and the use of the option -u will unlock it.
DISABLING an account is done by setting the expiration time of the user account to some point in the past. This can be done with chage -E 0 username, which sets the expiration date to 0 days after the Unix epoch. Setting it to -1 will disable the use of the expiration date.
The effect of locking to to prevent the login process from using a supplied password to hash correctly against the saved hash (by virtue of the fact that the pre-pended marker character(s) are not valid output character(s) for the hash, thus no possible input can ever be used to generate a hash that would match it). The effect of disabling is to prevent any process from using an account because the expiration date of the account has already passed.For my situation, the use of locking is not sufficient because a user might still be able to login, e.g. using ssh authentication tokens, and processes under that user can still spawn other processes. Thus, we have accounts that are enabled or disabled, not just locked. We already know how to disable and enable the account - it requires root access and the use of chage, as shown above.To repeat my question: is there a shell command which can be run without root privileges which can output the status of this account expiration info for a given user? this is intended for use on a Red Hat Enterprise 5.4 system.The output is being returned to a java process which can then parse the output as needed, or make use of the return code.
View 2 Replies
View Related
Jan 18, 2010
I'm setting up Ubuntu Karmic on my sister's old computer for my nephew, he's quite young so my sister asked to install some content filtering. I'll first setup an OpenDNS account and I've installed and managed to get dansguardian and squid working on a virtual machine to try it out. so far it's working pretty well, but I need to secure it form the inside out.
I was thinking of blocking specific outbound ports so he could not bypass the proxy. because by default the firefox configuration can be easily changed. so I have a couple of questions.
1. is it possible to block outgoing ports on Ubuntu?
2. is that the best method?
3. is there anything else I should be aware of to prevent subversion?
lastly, this question is probably unrelated to this board but I've set up a cron job to update a dynamic ip with OpenDNS, the problem is that the password is in clear text in the user's crontab, can I play with permissions? is it possible to run the job under a root account and deny read/write access to a normal user?
View 1 Replies
View Related
Feb 17, 2010
I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.
View 8 Replies
View Related
Sep 2, 2010
Today I found something really interesting (at least to me) on one of our test servers:
I can change into an existing directory from my actual working directory using a relative path, but that very same directory is not listed when using ls -a.
Here is the shell session (as root):
$ pwd
/you/are/here
$ ls -a
. .. <-- Note: "somedir" is not shown to root
$ echo $CDPATH
[Code]....
I had checked the automount thing mentioned by Gilles, but as I had changed to somewhere and issued a mount|grep somewhere there were no output.
Here is the lsattr and strace output as suggested: [URL]
View 8 Replies
View Related
Aug 27, 2009
I did a fresh fedora install and have overwritten the root user directory ( /root) with a backup of a previous install. Now I cannot log on through the login screen with the root user password. I can login su - as root on the command line with the password OK.
View 1 Replies
View Related
Dec 21, 2010
My linux distro is CentOS 5.3. Today I edited /etc/sysconfig/readonly-root and set "READONLY" to yes, now my /etc/sysconfig/readonly-root file is like this:
# Set to 'yes' to mount the system filesystems read-only.
READONLY=yes
# Set to 'yes' to mount various temporary state as either tmpfs
[code]...
View 3 Replies
View Related
Apr 15, 2011
Is it possible to copy files from directory of one user to directory of another user in linux?
View 7 Replies
View Related
Aug 7, 2009
I need to create an SSH user that can only access the directory I would specify for them. For example, I've been able to execute the following:
useradd -d /home/me/directory_for_this_user someuser
So when someuser logs in they get into this directory. Problem is that once they log in they can simply execute:
cd /
and navigate through all other directories which is a security risk.
How I could limit someuser's access to only /home/me/directory_for_this_user and its subdirectories and nowhere else in the system?
View 1 Replies
View Related
Mar 17, 2011
Why can't you use the command "sudo su root" from a user besides Ubuntu?
View 2 Replies
View Related
Feb 25, 2010
I've looked everywhere but I can't find where to change the default box for incoming mail, or am I on the wrong track. It's a nuisance having to change folders and I can't configure wastebin to empty on exit.And I can't get kmail to import from evolution. Do I have to go to the evolution storage and do it manually, and if so, how do I do that?
View 1 Replies
View Related
Feb 25, 2011
I am trying to write a perl script which will give an interactive session to a user to execute command on the server. I have written a small script to do this :
Code: !/usr/bin/perl -w
use strict;
use Net::SSH::Perl;
my $host = '192.168.1.1';
my $username = 'user';
my $login_passwd = 'test123';
[Code]...
View 2 Replies
View Related
Oct 24, 2010
how do you get to the usr directory from command line.
View 5 Replies
View Related
May 25, 2011
I am a Fedora user and have recently shifted to Debian.I tried to install httperf using the following command as root user:apt-get install httperfbut apt-get cannot locate the package:
root@D6-VM:/home/saad# apt-get install httperf
Reading package lists... Done
Building dependency tree
[code]....
View 3 Replies
View Related
Jun 8, 2010
Because I have a flaky wireless device, I occasionally get a hung connection and this script gets things running again in just a few seconds except obviously the boldfaced item, as it still tries to run in the root directory and gives errors:
Configuration file "/root/.kde/share/config/knetworkmanagerrc" not writable.
Please contact your system administrator.
So I am not sure how to get knetworkmanager to run as me, the user ubuntu in the /home/ubuntu directory
#!/bin/bash
service network-manager stop
sleep 1
killall -9 knetworkmanager
[code]....
View 1 Replies
View Related
Apr 19, 2010
I was wondering if someone had a logical reason and therefore complete, hopefully that makes total sense, for why when I install Ubuntu I cannot use the 'sudo' command either with root or user passwords. Even if I try to edit the permissions for sudoers, I still recieve an error message that says access is denied and so as the root user on my pc I don't understand why I can't put my name in the sudoers file or use the sudo command with the correct password.
View 9 Replies
View Related
May 12, 2010
I want to copy file from the Server cd drive and USB drive to the server root directory, but I haven't find any command of listing the cd drive or usb drive.
View 4 Replies
View Related
Jan 4, 2010
Why we have to log in as root user some times while we can use sudo in command line ,is it diffrent , does sudo dont have all access and all permessions? i am really lost , i know little of alot of things in ubuntu ,but still missong alot of circles to make the complate picture.
View 8 Replies
View Related
Mar 8, 2011
I have a machine which has only /opt with some decent amount of space where I can install a software. /opt belongs to root:root. The software I want to install cannot be installed as root user.
So lets say I create a directory called /opt/install1 and then chown -R install1 to belong to user1. And now I install the software under /opt/install1 with user as user1.
Is this a best practice violation? There could potentially be just /opt/install1 belong to user1 and in future everything else created under /opt belonging to root..
View 2 Replies
View Related