Results 1 to 4 of 4

Thread: Ubuntu Linux folder permissions

  1. #1
    Junior Member
    Join Date
    Dec 2007
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Ubuntu Linux folder permissions

    hi,
    i need to give read and write permission on specific folder for specific user.else that user can,t do anything on the server.help me out

    thanks

  2. #2
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,513
    Thanks
    17
    Thanked 804 Times in 511 Posts
    Rep Power
    10

    Default

    To set permission use chmod command - Unix or Linux commands for changing user rights

    To change folder / file permission use chown command - How to use chmod and chown command
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  3. #3
    Junior Member
    Join Date
    Jun 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Hi,

    you can use the 'setfacl' command to achieve this.


    eg:

    [root@ldp tmp]# touch sample.txt
    [root@ldp tmp]# getfacl sample.txt #list current ACL
    # file: sample.txt
    # owner: root
    # group: root
    user::rw-
    group::r--
    other::r--

    [root@ldp tmp]# chmod 700 sample.txt
    [root@ldp tmp]# getfacl sample.txt
    # file: sample.txt
    # owner: root
    # group: root
    user::rwx
    group::---
    other::---

    [root@ldp tmp]# setfacl -m u:aneesh:rw sample.txt # give the read,write access to user aneesh

    [root@ldp tmp]# getfacl sample.txt
    # file: sample.txt
    # owner: root
    # group: root
    user::rwx
    user:aneesh:rw-
    group::---
    mask::rw-
    other::---





    By using setfacl command you can add as many users as you like.

  4. #4
    Member
    Join Date
    Jul 2010
    Posts
    38
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Rep Power
    0

    Default Use groups

    The easiest way to do what you want would be to set the folder's owner group to a group in which the user belongs.
    Code:
    groupadd <group_name>
    usermod -a -G <group_name> <username>
    chgrp <group_name> <your_folder>
    Than you set your folder's group permission like you want (using chmod)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Adding Users in Bulk + Passwords and permissions
    By ricksd2sd in forum Shell scripting
    Replies: 0
    Last Post: 23rd April 2008, 12:20 PM
  2. Replies: 1
    Last Post: 25th October 2007, 01:44 PM
  3. set up hostname in ubuntu linux
    By raj in forum Linux software
    Replies: 1
    Last Post: 20th December 2006, 02:51 PM
  4. Secure vsftpd FTP permissions on anonymous user uploads
    By nixcraft in forum Getting started tutorials
    Replies: 6
    Last Post: 20th December 2006, 02:00 AM
  5. Replies: 2
    Last Post: 20th December 2006, 01:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •