LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File Locked (https://www.linuxquestions.org/questions/linux-newbie-8/file-locked-84970/)

guyd 08-23-2003 05:39 PM

File Locked
 
My distro is Mandrake 9.1.

I want to downlaod a file from the Internet and put it in /usr/src and would like to give write privileges and own the directory to the group "users." As root, I did the following:

I used chmod 770 /usr/src to assign the privileges.

I used chown root.users /usr/src to give ownership to users.

I loged back in as myself, ran KDE 3.1. From KDE, I ran Konqueror Web Browser, went to the web site, and attempted to download the file I wanted to put in /usr/src. I was denied access to src. When I checked the directory, I found that the permissions were 750 and was told that the director was Locked.

What am I doing wrong?

Mathieu 08-24-2003 11:24 AM

Try again.

Login as root and type the commands again:
Also, for chown, use a colon ( : )
Code:

chmod 770 /usr/src
chown root:users /usr/src

What does the ls command tell you.
Code:

ls -lsa

guyd 08-24-2003 01:00 PM

After doing what you suggested and running ls -lsa, I get the following information:

<code>
4 drwxrwx--- 4 root users 4096 Aug 24 07:32 src/
</code>

When I logout as root, however, and login with my username and password, I cannot access /src. When I type cd src and press enter, I receive the following information:

<code>
-bash: cd: src: Permission denied
</code>

Do I need to make myself a member of the users group or am I a member of users group by default? If I need to add myself to the users group, how do I do that?

What next?

Mathieu 08-24-2003 02:22 PM

Yes, you need to add your user to the users group.

You can use UserDrake.
It is located in the Control Center (DrakConf).
http://doc.mandrakelinux.com/Mandrak...userdrake.html

guyd 08-24-2003 03:52 PM

When I open Mandrake Control Center, type the root password, click on System, and then UserDrake, I am told that "The password you typed is invalid. Please try again."

I don't understand this because the password I tryped is the root password. And what is more, I don't know how to "try again." can you help me resolve this problem?

I have also been told that I can edit the groups file manually at /etc/groups. The groups file, however, is not in my /etc directory. Do you have any idea where it might be?

I will greatly appreciate your answering these two questions for me.

Mathieu 08-24-2003 04:12 PM

The groups file is /etc/group

As for your root password, if you are logged-in as a normal user, at the command line, type:
Code:

su -
And enter your root password.

guyd 08-24-2003 05:28 PM

As I say, when I open Mandrake Control Center, type the root password, click on System, and then UserDrake, I am told that "The password you typed is invalid. Please try again." I am logged in as root, not as myself.

Also, I cannot find the groups file /etc/group. There is nothing in the /etc directory that resembles that. group does not show up in this directory when I type ls -a.

leonscape 08-24-2003 05:30 PM

type:

su
#Then enter your root password
usermod -G users yourusername
exit

This will add the user to the group users so that it has permissions for the directory.


All times are GMT -5. The time now is 04:36 PM.