I got this  drwxrwxr-x 3 root tunnel 100 date and time . drwxr-xr-x 33 root root 860 date and time … -rwxrwxr-x 1 root tunnel 0 date and time enable-updates drwxrwxr-x 2 root tunnel 40 date and time interface -rwxrwxr-x 1 root tunnel 151 date and time resolv.conf   Then I run   sudo chown --recursive root:tunnel run/resolvconf sudo chmod --recursive 775 /run/resolvconf   Then I get this  drwxrwxr-x 3 root tunnel 100 date and time . drwxr-xr-x 33 root root 860 date and time … -rwxrwxr-x 1 root tunnel 0 date and time enable-updates drwxrwxr-x 2 root tunnel 40 date and time interface -rwxrwxr-x 1 root tunnel 151 date and time resolv.conf   but after few second or reboot all is OVERWRITTEN flags and file resolv.conf and I get this again  ls -al /run/resolvconf total 4 drwxrwxr-x  3 root tunnel 100 date and time . drwxr-xr-x 33 root root   860 date and time .. -rw-r--r--  1 root root     0 date and time enable-updates drwxrwxr-x  2 root tunnel  40 date and time interface -rw-r--r--  1 root root   151 date and time resolv.conf   and I cant chattr  chattr: Operation not supported while reading flags on /etc/resolv.conf   here is cat for resolv.conf  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN
50278
I was given the files for a mini linux, that boots directly into firefox. It works for all it should be doing, only that I do not get an internet connection.  We have 3 DNS servers in the network, which all work. I can ping them, too. But when trying to ping google.de or wget google.de I get a bad address error.  nslookup google.de works for some reason.  I tracked the issue down to my resolv.conf on the booted system not having the same contents as the resolv.conf that I put into the .iso file.  I tried understanding all the factors that go into creating and modifying resolv.conf. I'm not quite sure I got it all, but I definitely didn't find my solution there.  So as a last ditch effort, I tried making the resolv.conf file immutable using   :~# chattr +i /etc/resolv.conf   When rebuilding and booting again to my surprise my file was renamed to resolv.conf~ and in its place was the same standard file that has been haunting me.   The file contents make me believe it gets the information from the network itself. When starting the .iso in Virtualbox without internet access, my file is being kept as it is.  I tried changing /etc/dhcp/dhclient.conf to not get the information from the net, by deleting domain-name-server and domain-name-search from the request part of the file.  Didn't work unfortunately.  I don't have the NetworkManager installed. The iso is based on Ubuntu 14.04.  There is probably vital information missing. I'm happy to provide it.  UPDATE:  I think I found the file that clears resolv.conf.  It seems to be /usr/share/udhcpc/default.script  #!/bin/sh  # udhcpc script edited by Tim Riker &lt;Tim@Rikers.org&gt;  [ -z "$1" ] &amp;&amp; echo "Error: should be called from udhcpc" &amp;&amp; exit 1  RESOLV_CONF="/etc/resolv.conf" [ - n "$broadcast" ] &amp;&amp; BROADCAST="broadcast $broadcast" [ -n "$subnet" ] &amp;&amp; NETMASK="netmask $subnet"  case "$1" in     deconfig)         /bin/ifconfig $interface 0.0.0.0         for i in /etc/ipdown.d/*; do             [ -e $i ] &amp;&amp; . $i $interface         done         ;;      renew|bound)         /bin/ifconfig $interface $ip $BROADCAST $NETMASK          if [ -n "$router" ] ; then             echo "deleting routers"             while route del default gw 0.0.0.0 dev $interface ; do                 :             done              metric=0             for i in $router ; do                 route add default gw $i dev $interface metric $((metric++))             done         fi          echo -n &gt; $RESOLV_CONF # Start ----------------           [ -n "$domain" ] &amp;&amp; echo search $domain &gt;&gt; $RESOLV_CONF         for i in $dns ; do             echo adding dns $i             echo nameserver $i &gt;&gt; $RESOLV_CONF         done         for i in /etc/ipup.d/*; do             [ -e $i ] &amp;&amp; . $i $interface $ip $dns          done # End ------------------         ;; esac  exit 0   It's part of the udhcpc program. A tiny dhcp client, that is part of busybox  Will investigate further.    UPDATE2 AND SOLUTION:  I commented the part out (#Start to #End), that seemingly overwrites the /etc/resolv.conf file and sure enough. That was the culprit. So an obscure script caused all this trouble.  I changed the question to reflect, what actually needed to be known to solve my problem, so it would be easier to find for people with the same problem and so I could accept an answer.  Thanks for the help here in figuring things out.
82108
It might be the time of night, but this is puzzling me. Picture the following.  [root@node1 acltest]# getfacl foo/ # file: foo # owner: root # group: testuser user::rwx group::r-x other::---  [root@node1 acltest]# ls -la . total 24 drwxr-xr-x  3 root root     4096 Feb  9 21:53 . drwxr-xr-x 25 root root     4096 Feb  9 21:54 .. drwxr-x---  2 root testuser 4096 Feb  9 21:53 foo [root@node1 acltest]# setfacl -m m::rwx foo [root@node1 acltest]# getfacl foo/ # file: foo # owner: root # group: testuser user::rwx group::r-x mask::rwx other::---  [root@node1 acltest]# ls -la . total 24 drwxr-xr-x   3 root root     4096 Feb  9 21:53 . drwxr-xr-x  25 root root     4096 Feb  9 21:54 .. drwxrwx---+  2 root testuser 4096 Feb  9 21:53 foo [root@node1 acltest]# su - testuser [testuser@node1 ~]$ cd /acltest/foo/ [testuser@node1 foo]$ ls -la . total 16 drwxrwx---+ 2 root testuser 4096 Feb  9 21:53 . drwxr-xr-x  3 root root     4096 Feb  9 21:53 .. [testuser@node1 foo]$ touch bar touch: cannot touch `bar': Permission denied   In words: I create a directory foo, with mode 0750, root as owner and testuser as the group. (testuser is the private group of testuser, but that doesn't matter.)  The getfacl command correctly shows no ACL's on this directory and there is not mask yet. The mask will be set accordingly to the group permissions if I would add a named group or user now.  If I explicitly set the mask to rwx now, the group permissions as shown by ls change too. I know it happens the other way around (the mask changes when the group permissions change), but this seems puzzling.  The more puzzling because the getfacl output does not show the group permissions as rwx but - as said - ls does.  Which one is right? Apparently, the output of getfacl is right, because testuser cannot write to foo. As expected, by the way, because I did not grant the testuser group any permissions to do so.  It goes on. I cannot allow the testuser group write permissions on foo by just using chmod. I have to explicitly set an ACL using setfacl -m g:testuser:rwx foo to allow testuser to finally touch foo/bar.   Can someone explain the rationale behind the difference in the outputs of getfacl and ls? I know it can be tricky to have normal permissions go together with ACL's, but this seems plain wrong. (Though I expect to be missing something glaringly obvious ;))  I have already seen
63910
I want to set a custom time in ubuntu 14.04   lets say : 8 OCT 2010 18:00:00  wrkstn@wrkstn-VirtualBox:~$ sudo date --set="8 OCT 2006 18:00:00" Sun Oct  8 18:00:00 PETST 2006 wrkstn@wrkstn-VirtualBox:~$ date Fri Sep  2 01:21:51 PETT 2016 wrkstn@wrkstn-VirtualBox:~$    But i am not able to set custom date with Date command. Please Tell me how can i accomplish this.
19160
Knowing that giving a user a sudo's grace period right from the point when he/she login might be a security issue, I still think it will be a beneficial trade-off between security and usability in my setup.  The question is: how to do that? As far as I know, the sudo doesn't provide CLI for it.  I might somehow divert the gdm's typed password to something like sudo false, but again: how to get hold of the provided by the user password in the plain text? Should I write a custom pam module for it?  Or maybe it is better to immerse into implementation details of the sudo and as a root directly manipulate the timestamp database?
55979
If I change the umask to 0000, I'd expect a text file to be created with rwxrwxrwx permissions (based on my understanding of the umask, ) However, when I try this, I get the following  $ umask 0000 $ touch /tmp/new.txt $ ls -ld /tmp/new.txt  -rw-rw-rw-  1 alanstorm  wheel  0 Jun  2 10:52 /tmp/new.txt   That is, execute permission is omitted, and I end up with rw-rw-rw- for files (directories are rwxrwxrwx).  I tried this on my local OS X machine, an old BSD machine I have at a shared host, and a linux server running on linode.   Why is this?  Its my understanding that umask is the final arbiter of permissions -- is my understanding of this incorrect?  If so, what else influences the default permissions of files on a unix system?
102236
I have a file with the following permissions on my MacBook Pro:  -rwxr-xr-x@  1 root  wheel   101K Feb 29 17:09 apachectl  What does the @ stand for?  I can't execute the file and this is the only thing that's standing out to me.  How can I get rid of it?    Just as some background, I copied this from a Time Machine backup.
85670
Much like /etc/profile and ~/.profile but ran by root instead of the user is doing login. /etc/rc.local runs after boot but I need running the script before login. The user is not a sudoer one.   Thanks!
66206
I am working on an embedded device. The fstab shows the following info:  &lt;file system&gt; &lt;mount pt&gt;      &lt;type&gt;  &lt;options&gt;         &lt;dump&gt; &lt;pass&gt; /dev/root       /               ext2    rw,noauto                           0               1 proc            /proc           proc    defaults                            0               0 devpts          /dev/pts        devpts  defaults,gid=5,mode=620             0               0 tmpfs           /tmp            tmpfs   defaults                            0               0 ramfs           /var            ramfs   defaults                            0               0 sys             /sys            sysfs   defaults                            0               0   Running the mount command I get this:  rootfs on / type rootfs (rw) /dev/root on / type squashfs (ro,relatime) proc on /proc type proc (rw,relatime) sys on /sys type sysfs (rw,relatime) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620) ramfs on /var type ramfs (rw,relatime)   Which means that the root filesystem is read-only.  How can I remount the read-only part as read-write?
61766
I recursively deleted the contents of my root directory with sudo privileges. My display reset, and windowing stopped working. I could no longer run non-buitin commands. Most of my directories (including the home directory disappeared).  What I meant to run:  sudo rm ./* -rf   What I believe I ran:  sudo rm /* -rf   I understand how this command works (see ).  I'm trying to get a better sense of how much (and what parts) of the original files and directory-structure physically remains on the hard-drive.  How much of these "remains" are recoverable? E.g is it possible to use data recovery software like TestDisk/PhotoRec to recover the full home dir itself? What about config files?
37272
I'll try to explain this as best I can...  I'm on ubuntu 13.04, and I am running a local BIND instance at 127.0.0.1 for access to basic wild-card DNS for development (i.e. "*.dev == 127.0.0.1" - yes, I know, don't create fake tlds, etc. This is entirely local to my machine, though).  I also have clients who have their own DNS servers set up through a VPN (at 192.168.140.111 or something similar).  My problem is that if my resolv.conf has their DNS server listed first, I can't access my *.dev, and if I have my DNS server listed first, I can't access their *.vpn records.  Currently, this is my resolv.conf:  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 192.168.140.111 search ns1.vpn nameserver 127.0.0.1 nameserver 127.0.1.1 search fritz.box   The first three lines of the config are in /etc/resolvconf/resolv.conf.d/head, so they'll survive through a resolvconf -u.  Essentially what I want to know is this: is there a way for me to set this up so *.dev goes to my dns server, and *.vpn goes to theirs, (and everything else goes off to my ISP).
39417
System is Ubuntu 10 LTS 64bit (2.6.35.31), I'm running on xen 4.0, no services active, cron stopped, scheduler is cfq for the disk /usr is mounted from:  time find /usr -exec stat {} \; &gt; /dev/null 2&gt;&amp;1 &amp;  giving  real    0m35.760s user    0m0.270s sys 0m3.910s   and  time ionice -c3 find /usr -exec stat {} \; &gt; /dev/null 2&gt;&amp;1 &amp;  giving  real    0m36.110s user    0m0.310s sys 0m4.100s   which is exactly as expected, now I run both at the same time:  time find /usr -exec stat {} \; &gt; /dev/null 2&gt;&amp;1 &amp; time ionice -c3 find /usr -exec stat {} \; &gt; /dev/null 2&gt;&amp;1 &amp;  where to my believe the ioniced version should be much slower while the straight version should be as fast as if running alone. but:  straight:  real    1m10.430s user    0m0.320s sys 0m3.940s   ioniced:  real    1m10.230s user    0m0.250s sys 0m4.020s   which implies that ionice did not work at all. Any hints?
32801
I have a Linux box (Ubuntu server 11.10) inside a Windows Active Directory domain, and is joined the domain using . The resolv.conf file looks like this:  domain mydomain.com nameserver 192.168.1.1 nameserver 8.8.8.8 nameserver 8.8.4.4   where 192.168.1.1 is the Windows DNS server for the Windows domain. 8.8.8.8 and 8.8.4.4 are Google's public DNS servers that we preferred over our ISP servers.  That setup was working properly, until we decided to disable recursion in the Windows DNS server due to some changes of our network design. I thought that will go well as we have configured it to use Google's servers next, but it seems not:  mydomain\myuser@linux-server:~$ dig google.com  ; &lt;&lt;&gt;&gt; DiG 9.7.3 &lt;&lt;&gt;&gt; google.com ;; global options: +cmd ;; Got answer: ;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 55321 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 4 ;; WARNING: recursion requested but not available  ;; QUESTION SECTION: ;google.com.                    IN      A  ;; AUTHORITY SECTION: .                       3600    IN      NS      c.root-servers.net. .                       3600    IN      NS      d.root-servers.net. .                       3600    IN      NS      e.root-servers.net. .                       3600    IN      NS      f.root-servers.net. .                       3600    IN      NS      g.root-servers.net. .                       3600    IN      NS      h.root-servers.net. .                       3600    IN      NS      i.root-servers.net. .                       3600    IN      NS      j.root-servers.net. .                       3600    IN      NS      k.root-servers.net. .                       3600    IN      NS      l.root-servers.net. .                       3600    IN      NS      m.root-servers.net. .                       3600    IN      NS      a.root-servers.net. .                       3600    IN      NS      b.root-servers.net.  ;; ADDITIONAL SECTION: c.root-servers.net.     3600    IN      A       192.33.4.12 d.root-servers.net.     3600    IN      A       128.8.10.90 e.root-servers.net.     3600    IN      A       192.203.230.10 f.root-servers.net.     3600    IN      A       192.5.5.241  ;; Query time: 4 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Wed Jan  8 14:02:22 2014 ;; MSG SIZE  rcvd: 507   Also:  mydomain\myuser@linux-server:~$ ping google.com ping: unknown host google.com   And also I have failed squid proxy connections (which I solved using the  option inside squid configuration and neglected the internal DNS server).  Why DNS requests fails when recursion is declined by the first nameserver? Shouldn't the machine tries the next server? And what can I do if that was the expected (designed) behavior?  EDIT: NSLOOKUP gave other (success) results:  mydomain\myuser@linux-server:~$ nslookup google.com ;; Got recursion not available from 192.168.1.1, trying next server Server:         8.8.8.8 Address:        8.8.8.8#53  Non-authoritative answer: Name:   google.com Address: 173.194.67.102 Name:   google.com Address: 173.194.67.138 Name:   google.com Address: 173.194.67.100 Name:   google.com Address: 173.194.67.113 Name:   google.com Address: 173.194.67.139 Name:   google.com Address: 173.194.67.101   So is this application-dependent? Can I get that (trying next server if the first refuses recursion) to work transparently for all applications requesting name resolution, or name resolution is the responsibility of the program itself? (or am I missing something?!)...  EDIT: Also worth noting, mydomain.com is a registered and public address on the internet and is not owned by us. It's like we've set up an internal domain named apple.com, and I assure you I don't work for Apple, at least not yet ;-).
1560
Why is the chown command root-only? Why can't non-root users use chown to give away files they own?
89196
Just like you can see in the screenshot above, sometimes the clock &amp; date won't show up on boot. I have to log off to make it appear again.   Is that because I have a custom-time format in dconf editor ( %a, %d. %h  %H:%M ) ?
20310
Possible Duplicate:          Yeah I could  (and probably will) just escalate to root, but I'd like to know why this doesn't work?  sudo cat .mplayer/config &gt;&gt; /home/griff/.mplayer/config zsh: permission denied: /home/griff/.mplayer/config   sudo is configured to be able to run any command, I've placed no restrictions on it.
32916
I have the following files (output of ls -l):  ?rw-------  6144 1684128777 2049835008 50331648 Jan  1  1970 image1.jpg br-xrwSrw- 25120 1987343475 1936028517 110, 110 May 30  2032 image2.jpg ?--------- 25966  774963978 1954164340      187 Apr  8  1996 image3.jpg br--r-xrwT  9776  892169583  859126070  80,  76 May 19  1999 image4.jpg c--xr-xrw- 25967 1852137846 1931502624  77,  32 Nov 15  2031 image5.jpg   A normal file in the same directory looks like:  -rw-r--r--     1 apache     apache       198849 Jan 29 21:45 image6.jpg   I already tried to remove those weird files with rm -f but I got the error:  rm: cannot remove `image1.jpg': Operation not permitted   When I try to check the flags/remove immutable flag with lsattr and chattr then I get the following errors:  lsattr: Operation not supported While reading flags on image1.jpg chattr: Operation not supported while reading flags on image1.jpg   Questions   What is going on here? These files seem corrupt? How can I remove/fix these files?
116370
EDIT: I have since found that by using a folder in the root directory, things get a bit further - I can list the subfiles.  So it really looks like permissions on the folder are the issue.  I'm not sure what else to do besides chmod 777.  I'm trying to configure an anonymous rsync daemon on CentOS 5.9.  If I allow chroot the server reports that chroot fails.  If I disable it, chdir fails.  # rsyncd.conf  max connections = 20 log file = /var/log/rsync.log timeout = 300 use chroot = false  [builds]     path = /home/fuzz/builds     read only = yes     list = yes     uid = nobody     gid = nobody   .  # /etc/xinetd.d/rsync  # default: off # description: The rsync server is a good addition to an ftp server, as it \ #       allows crc checksumming etc. service rsync {         disable = no         socket_type     = stream         wait            = no         user            = root         server          = /usr/bin/rsync         server_args     = --daemon         log_on_failure  += USERID }   I have set all files and folders under /home/fuzz/builds to 777.  The folder is owned by the user fuzz.  On the client side, this works...  $ rsync rsync://host builds   But when I try to view the contents of the builds directory, I get this error...  $ rsync -vvvv rsync://host/builds opening tcp connection to host port 873 Connected to host (10.186.5.90) note: iconv_open("UTF-8", "UTF-8") succeeded. sending daemon args: --server --sender -vvvvde.Lsf . builds/ @ERROR: chdir failed [Receiver] _exit_cleanup(code=5, file=main.c, line=1534): entered rsync error: error starting client-server protocol (code 5) at main.c(1534) [Receiver=3.0.9] [Receiver] _exit_cleanup(code=5, file=main.c, line=1534): about to call exit(5)