need user permittionsForum: DSL Tips and Tricks Topic: need user permittions started by: mannetje Posted by mannetje on May 01 2006,19:22
i need user dsl to have permittions over the /opt directory how?
Posted by whiteweasel on May 01 2006,21:14
Permissions to do what? Read, execute, write, or all of the above? Why is this something you wouldn't do as root using sudo? Before you open up your software to the world you might want to consider the security implications. In any case, as root, you would type in: chmod <number> <path> where the number (three digits) sets the permissions for the owner, group, and world. World means everybody. 1= execute 2=write 4=read Numbers are addititive. So, for example, if you wanted opt to be open to the world (including dsl) for reading and executing but not for writing, but you wanted root (the owner) to be able to do anything you might do: sudo chmod 755 /opt I highly recommend reading the man page for chmod, chgrp, chattr, chage, etc... and learn basic UNIX/Linux security. You really don't want to leave things open to the world if you don't have to. Posted by mannetje on May 02 2006,10:31
i need permissions for user dsl to read write and execute in /opt Posted by mikshaw on May 02 2006,12:00
User dsl has permissions to execute in /opt, and to read and write some existing files (DSL-specific stuff, mostly). If this is not the case, then something went wrong on your end.If you want to write new files to /opt as dsl, you should chmod 775 /opt, but as whiteweasel said there is really little reason to do this. opt is a system directory, and should therefore not be writeable by regular users. Changing this behavior opens your system to a greater chance of corruption. It's your choice, of course, but I'm just letting you know that so far I have never heard any useful reason for doing this. Posted by mannetje on May 02 2006,15:04
i know but for my proposes this is neccesairy but i need to chmod it i know but how, i don't know how to use the chmod command now don't give me something like chmod username permittions dirrectory because i still don't know nothing i just need the code i need to enter in my console please help... Posted by doobit on May 02 2006,15:24
He just did
Posted by mannetje on May 02 2006,17:28
no he didn't i just need to know exactly what i have to enter in the console, the exact code which i just could copy and paste into my console because i just don't know anything about the console shit... Posted by mikshaw on May 02 2006,17:52
sudo chmod 775 /optAs long as /opt is still owned by root.staff (which it should be on a clean system) then user dsl, who is a member of "staff" group, will be able to write to /opt. If the ownership of /opt has somehow been changed to root.root (from a poorly-made mydsl, for example) you can do sudo chown root.staff /opt to fix it. If you need to have write access to subdirectories inside /opt, they would need to be created by user dsl after the chmod command is run, or else they would need to be individually chmoded afterward. Some might say you could chmod /opt recursively, but that's a bad idea unless you know exactly what you're doing, or want to use a more complex command to chmod only the directories. In any case, whiteweasel did explain how to chmod a file, and recommended some important documatation. It would benefit you more in the future if you learned what you're doing and why you're doing it rather than just pasting commands. Just an opinion. Posted by mannetje on May 02 2006,18:30
thx but already some friend helped me out, anyway thx for your help... |