Re: Permissions denied ifcfg-eth0



On 18 Oct 2006, in the Usenet newsgroup alt.os.linux.redhat, in article
<1161207987.125459.223940@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, juliefo@xxxxxxxxxxxxxx
wrote:

When I boot, and when I shutdown I see a message saying that there is a
problem accessing /etc/sysconfig/network-scripts/ifcfg-eth0 (also for
network-functions because it wants to access ifcfg-eth0)

Copy the EXACT error messages. 'network-functions' is a series of
tiny scripts that are used by the configuration tool (/sbin/ifup),
and 'ifcfg-eth0' is the configuration file for the eth0 interface,
also used by that configuration tool.

in desparation I did this:

chmod a=rw ifcg-eth0

AAAARGH!!!! Permissions are divided into three groups: The first three
is for the owner of the file (should be root in this case). The next three
are for the group of the file (should also be root in this case), and the
last three are for EVERYONE _ELSE_ (other than the owner, and members of
the group that owns the file). If you are the owner of the file, then
the first set of permissions (-rwx------) refer to you, and all else is
ignored. If you are not the owner, but belong to the group that owns the
file, then the second set of permissions (----rwx---) refer to you. If
you are not the owner, and not a member of the group, ONLY THEN do the last
set of permissions (-------rwx) pertain to you.

Further, processes running _as_root_ ignore permissions, because root is
the super user. Thus, you have something else wrong, but you haven't
told us what that might be. One place to start (in addition to getting
the exact error messages) is to look at the ownership and permissions of
those files (should be -rw-r--r-- and owned by root and root) and the
directories above them (should be drwxr-xr-x and same ownership).

so now everyone has read/write access but I still get the messages.

Put the permissions back the way they were. ('chmod 644 ifcg-eth0' or you
can have the package manager do so [WATCH THE QUOTES HERE] by the command
'rpm --setperms `rpm -qf /etc/sysconfig/network-scripts/ifcfg-eth0`' - the
inner quotes are 'backtics' which is the shifted tilde key next to the Tab).

World writable files and directories are generally a no-no. and _very_few_
are found on the average system. In fact:

[compton ~]$ find / \( -type d -o -type f \) -perm -006 -exec ls -ld {} \;
drwxrwxrwt 3 root root 16384 Oct 19 13:03 /tmp
drwxrwxrwt 2 root users 1024 Sep 7 07:16 /tmp/.X11-unix
drwxrwxrwt 2 root root 1024 Sep 7 07:17 /var/tmp
[compton ~]$

on this entire system, there are just three directories that are world
writable, and all have the 'sticky bit' set so that only the owner of the
file can delete it. There are _no_ world writable files anywhere.

What is wrong and how can I fix it?

Not enough details - so fixing it is going to be fun. You might try using
the package manager to check the system for permission/ownership gaffes.
As root, the command is 'rpm -Va > /tmp/files.2.check' and this may take
a minute or two to run. '/tmp/files.2.check' will have a list of files
with one kind or another problem - see the rpm man page under the section
'VERIFICATION' to see what the code letters mean. It is normal for _some_
files/directories to show up there. On this workstation with about 350
packages installed (about 34,000 files), 'rpm -Va' lists 128 files and
2 directories - mainly ownership changes, (G or U flag) and 24 with
permission changes (M) - mainly terminal devices.

Old guy
.



Relevant Pages

  • Re: Object permissions
    ... Who is the owner of the query? ... permissions does the owner have on the underlying tables? ... does the user have on the query; ... to 'owners' in the sql statement each time the code runs, ...
    (microsoft.public.access.security)
  • Re: Security without signon
    ... I cannot change the owner of the ... rather than inherited permissions by virtue of group membership. ... the default Admin user is the same across all mdw files. ... accounts plus the account for my SuperUser and the account for my SuperGroup, ...
    (microsoft.public.access.security)
  • Re: fbsd safety of the ports
    ... That may be true for the core files, but what about ports. ... On the net I read _never_ to let the webserver be the owner of its ... prior to updates/config changes to temporarily open the permissions. ... You can always jail the webserver as well. ...
    (freebsd-questions)
  • Re: "fields" in files
    ... I can see eight pieces of information: permissions, ... group (or group, owner), size, date, name of file or directory. ... collecting data from computers that are operating in different time ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: NTFS folder permissions - Creator Owner issue (I think)
    ... From what you're telling me an owner has rights that cannot ... which seems to include the right to change permissions whether we ... >> the grant to Creator Owner becomes a real grant to the creator or the ...
    (microsoft.public.security)