Question:

Open Directory in Linux?

by  |  earlier

0 LIKES UnLike

While logged in as user in Linux terminal, how can I create an open directory that can be shared by all users? Where users can also create files in that directory but can only deleter his/her own files in that directory?

 Tags:

   Report

2 ANSWERS


  1. what distrabution are you using.


  2. Ooo!  That's pushing the memory!!  :-D

    I know that I would do it from a command prompt using the chmod command.

    It doesn't matter what type of Linux you are using, you only need to find out how to open the equivalent of the MS-DOS command prompt box.  I think it's usually available in the program menu.  I'm not sure if you mean that you are already in a command window or just on a Linux terminal.

    I haven't had much chance to "play" with Linux for a while so the best way of answering your question is to point you to appropriate links with a bit of extra information.

    One of the links I gave you mentions being able to use the ls command.  That is a lower case LS.  It stands for list and simply means list the files.

    As one of the links will show you, it's the write part of the permissions that allows someone to delete files.

    There are shortcut ways of setting permissions that are quicker when you know them.  I think a standard one (memory, are you there??) is "chmod 755" (without the quotes) and allows the owner to have full control and everyone else to have read and execute permission.  Execute lets other people use it but it's the write permission that lets you delete.

    You can create the folders in the equivalent of Windows Explorer and then change to the command line to set the permissions or do it all from the command line.

    To make directories (folders) use the mkdir command.

    To change directories, use the cd (change directory) command.  

    cd ..

    (don't forget the space between d and .) moves up one directory.

    Be EXTREMELY careful with the rmdir (remove directory) or rm command.  If you add -r to the end, you can remove every file without intending to!!  This is a good resource for Linux commands:

    http://www.debianhelp.co.uk/commands.htm

    Here are the links:

    http://en.wikipedia.org/wiki/Chmod

    http://catcode.com/teachmod/

    The second link has the info about file permissions on the second page, this one:

    http://catcode.com/teachmod/chmod_2.html

    Hope that not only helps but launches you on a new phase of your Linux life!  :-)

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions