All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Christoph Pleger <Christoph.Pleger@cs.tu-dortmund.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: chmod fails though it pretends to succeed
Date: Mon, 25 May 2009 17:46:30 -0600	[thread overview]
Message-ID: <4A1B2DD6.3050405@gmail.com> (raw)
In-Reply-To: <20090525164457.278f0ec0.Christoph.Pleger@cs.tu-dortmund.de>

Christoph Pleger wrote:
> Hello,
> 
> I have a strange problem here with a C program that calls chmod.
> 
> The C program is a PAM module called pam-devperm. The purpose of this
> module is to set appropriate device ownerships and permissions when a
> user logs in. But the module does not work as expected on my Ubuntu
> 9.04 system. When a user logs in the first time after system boot, only
> the device ownerships are changed, the permissions are not. When the
> user logs out and in again, permissions are changed, too.
> 
> I added some lines of code to the the source of of pam-devperm so that
> it produces more debug output when changing the properties of /dev/dsp.
> The debug output showed me that chmod has been called to set the
> permissions of /dev/dsp to 0600 and that chmod returned 0, which means
> success. In spite of that, device permissions remain at 660.
> 
> Now I have two questions:
> 
> 1. What can be the reason for chmod to return a value of 0 though
> device permissions have not been changed?
> 
> 2. What can be the reason why this chmod fails on the first login of a
> user, but succeeds on further logins?

Are you sure that some other process is not changing the device 
permissions also?

> 
> Regards
>   Christoph  


  reply	other threads:[~2009-05-25 23:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25 14:44 chmod fails though it pretends to succeed Christoph Pleger
2009-05-25 23:46 ` Robert Hancock [this message]
2009-05-28  7:32   ` Christoph Pleger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A1B2DD6.3050405@gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=Christoph.Pleger@cs.tu-dortmund.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.