Dir set different owner ?

Discussion in 'Ruby' started by Svend-Erik Madsen, Jan 22, 2004.

  1. Hi
    While using:
    <SNIP>
    Dir::mkdir("/home/#{$user}/#{Netdir}")
    </SNIP>
    as root user, it seems that i cannot set owner on Dir, to $user afterwards ?
    I use the root user because im making a smb mount into Netdir:
    <SNIP>
    `/bin/mount -t smbfs -o\ username=#{$user},password=#{$passwd} //#{$host}/\
    #{$user} /home/#{$user}/#{Netdir}`
    Tk.messageBox('message'=>"/home/#{$user}/\
    #{Netdir} created and mountet !")
    </SNIP>

    /Svend-Erik
    Svend-Erik Madsen, Jan 22, 2004
    #1
    1. Advertising

  2. Re: Dir set different owner ? Solved

    Hi
    > `/bin/mount -t smbfs -o\ username=#{$user},password=#{$passwd}
    > //#{$host}/#{$user} /home/#{$user}/#{Netdir}`

    most be replased with:
    `/bin/mount -t smbfs -o uid=#{$user},gid=#{$user},username=#{$user},\
    password=#{$passwd} //#{$host}/#{$user} /home/#{$user}/#{Netdir}`
    Svend-Erik Madsen, Jan 22, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frank McCown

    change dir owner

    Frank McCown, Nov 30, 2003, in forum: Perl
    Replies:
    7
    Views:
    2,002
  2. =?Utf-8?B?UnVkeQ==?=

    Sub Dir, Virtual dir, what do I use?

    =?Utf-8?B?UnVkeQ==?=, Jun 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    421
    =?Utf-8?B?UnVkeQ==?=
    Jun 12, 2005
  3. Matthew Denner
    Replies:
    1
    Views:
    176
  4. Kga Agk
    Replies:
    2
    Views:
    145
    Kga Agk
    Jun 29, 2009
  5. Nick Gnedin
    Replies:
    2
    Views:
    157
Loading...

Share This Page