Creating a folder in /Opt


Forum: Apps
Topic: Creating a folder in /Opt
started by: jnymris

Posted by jnymris on April 09 2007,09:11
Hello everyone.

I'm totaly new first time linux users. I've install LAMPP but cannot create a folder in /opt/LAMPP/htdocs/

It says Permission Denied but when i click on persmission and set them it says chmod: /opt/LAMPP/htdocs :operation not permitted


I'm also having problems installing most software. does anyone have a guide of the different ways to install because
tar xvfz (filename) -C /opt

doesn't work.

Thanks and sorry if i didn't make any sense. I'd be very greatful if i recieved very simple (detailed) answers

I'm looking forward to using linux

-Johnny

Posted by curaga on April 09 2007,11:57
If you don't have permissions, then become God (alias root) with sudo su. There you are Bruce All Mighty.

Install with
Quote
mydsl-load extension4.dsl
It recognizes the format (dsl/tar.gz/uci/unc) and invokes the correct code. But if you want to go manual with .dsl's and .tar.gz's, the syntax would be
tar -C /opt -xvzf (filename)
    -C first     and nothing after f

Posted by mikshaw on April 09 2007,14:46
Keep in mind that if your mydsl package is unc or uci, you will not be able to write to the program directory no matter who you are or what kind of deity you know. These packages are mounted iso files and therefore the filesystem itself is read-only.

In the great wide unix world, tar.gz is used as a filename extension for any gzipped tar file. However, if it is a mydsl package, DSL handles it like any other mydsl, as curaga said, and it can actually be a bad idea to extract it manually.
Note that most tar.gz programs that aren't obtained through mydsl are source code packages, which are not very useful to a typical user running DSL without gcc/make

Posted by jnymris on April 09 2007,23:36
Quote (mikshaw @ April 09 2007,10:46)
Keep in mind that if your mydsl package is unc or uci, you will not be able to write to the program directory no matter who you are or what kind of deity you know. These packages are mounted iso files and therefore the filesystem itself is read-only.

In the great wide unix world, tar.gz is used as a filename extension for any gzipped tar file. However, if it is a mydsl package, DSL handles it like any other mydsl, as curaga said, and it can actually be a bad idea to extract it manually.
Note that most tar.gz programs that aren't obtained through mydsl are source code packages, which are not very useful to a typical user running DSL without gcc/make

How do i know if it is unc or uci? I'm not trying to create a folder in Aterminal i', trying to created a folder in Emelfm i don't know how to create a folder using ATerminal,

I've tried to use that code to install a package but also it never worked o i'm gussin it unc or uci wht i mean using then?

BTW the main reason i want to create a folder their is so i can store files so it would have to be a permament way of ensuring icould place files in their and not having to type sudo all the time  :(

Sorry, i hope someone can provide more light.

Like i said i'm totaly new to linux

(i did install LAMPP okay though?)

Posted by jnymris on April 11 2007,13:24
Could someone please help? I'm still not getting the answer i want, basicaly i want t get admin access al the time so i can create files in restricted areas such as /opt/LAMPP

without typing sudo su

so i can create files from Emlfe and not having to create files in the home direcary or Using the ATermial.

Posted by Juanito on April 11 2007,13:59
There are two options to start emelFM from the right-click menu - normal and super-user. Choose the super-user option.
Posted by mikshaw on April 11 2007,14:13
An option to always running as root, and to using emelfm as root (both can be quite dangerous), is to create a directory in /opt/LAMPP as root and change ownership of the directory to user dsl:

sudo mkdir /opt/LAMPP/whatever
sudo chown dsl.staff /opt/LAMPP/whatever

From that point you can add whatever you want to /opt/LAMPP/whatever as user dsl.  Depending on the purpose of this directory, it may not be a useful thing to do, however. I'd say the simplest alternative is to do as Juanito suggested, but please use emelfm as root only when necessary.

Determining if an installed extension is a uci or unc can be done by looking in the file /etc/mtab. This file lists all currently mounted filesystems, and if a uci or unc is mounted it should show up here.

Ultimately, you really should try to become comfortable using the commandline. You will probably find yourself gaining some pretty amazing powers that are not apparent to the click-only user.

Posted by jnymris on April 11 2007,17:14
Thanks Juantio that was jsut enought for my to do what i wanted to do Which was

To restore my files into a local webserver so i can test without being online. I hope this would also explains why i require root/admin access pretty often (as i will be editing/adding them files very often)

Mikshaw Thanks for your rather detailed answer, (i did read it all so it hasn't gone to waste) But why is it dangoures to run root/admin all the time? Because it you have access to every file? just for that reason?
Wheres the best place for learn using the commandline and the codes for using it?

The main reason i am using linux is because, it's very small and it's a slow computer but i want to test my website(coding) skills offline

Off-topic anyone know where i could download a feature that would alow me to install an e-mail server so i could send e-mail to an account and retirve them using an e-mail address. All localy though.

Thanks
-Johnny

Posted by mikshaw on April 11 2007,18:21
There are at least a few arguments against running applications as root (particularly graphical apps) and being root all the time. Two of the most common are
1) Root can do ANYTHING, including destroy your whole system with a mere typo or running a malicious piece of code. There are usually no "are you sure?" or "operation not permitted" messages when you are root.
2) Applications usually run with the permissions of the user running them. If you are running a hijacked program and are not root, the most damage that can occur is the destruction of your personal data. If you are root, the most damage that can occur is just about anything.

Some people consider running apps as root to be something completely off limits unless you absolutely have no other option, and logging in as root on a desktop system is simply not done. Other people think the whole thing is simply overblown paranoia and they continue to do everything as root because it's easy. Personally I'm somewhere in between. I'm an advocate of using a limited user to do as much as I can, and if it's a task that requires root I want to limit it to commandline or at most a visual shell such as mc, but I am not entirely against simply logging into a console as root. What I consider the most important part of security is having _good_ passwords for root and all users who have any ability to do harm to the system. I like to mention this whenever I hear someone say they want to just run as root all the time, but I don't want to push it too hard (particularly since you are running an offline machine, and frugal DSL systems can easily be repaired).

I still don't quite understand why running X applications as root is any more dangerous than console apps, but i guess it probably has to do with the fact that the added complexity of a GUI would inherit a greater chance of security issues...more code generally means more opportunities for programming errors. Maybe there's more to it than that.

There are many articles and forum posts on this subject spread around the Linux/Unix/OSX/BSD sections of the internet, so I think i'll leave it at that (plus I make a lot of assumptions about things I read, and feel comfortable stating only what sounds logical to me).

As for learning more about the commandline, there is a great repository of Linux guides at < http://www.tldp.org >
The url in my signature is a good one for linux basics.

I've looked into trying to get Postfix and Mutt installed and configured on a DSL machine, but have had no luck so far. Part of this is because Postfix/Sendmail configuration is way above my head, and haven't even succeeded in getting it working in Slackware, where I have a pile of documentation and support files already installed. When I used Suse, Postfix was already configured so that I could send and receive POP mail using Mutt, although I still have no idea if it was securely configured to prevent being used as a relay for others.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.