Results 1 to 10 of 18
Thread: How do I copy to USB?
Enjoy an ad free experience by logging in. Not a member yet? Register.
How do I copy to USB?
I have a slight problem. My PCLinuxOS is great and works perfect, but I can't copy stuff to my USB drive. I can read from it though. I can copy to it when I'm root, but I don't want to log in as root EVERYTIME I want to copy my files to my USB drive? Also, how can I give access to my user to copy stuff to the hardrive in a directory other than my "HOME" directory.
I can only copy to the desktop and HOME how do I change this? It's really annoying having to log in as root to do the smallest of tasks.
Well, to access the USB, you need to mount it writable by non-root users. Can you post up your /etc/fstab?
Writing to places other than /home and /tmp are intentionally disabled by regular users: these are all system files, and modification can have consequences.
If you still want to write to them (which I HIGHLY advise against: it can be a big security risk), you can do so by changing permissions with the chmod command. Write permission on a file allows you to write to it. Write permission on a directory allows you to create and delete files within the directory. Executable permission on a directory allows you to enter the directory. Everything else should be self-explanatory.
I'll post the fstab tomorrow because I'm not at home at the moment. The reason I want to be able to write to locations other than home is because I want to install software without being root and when I download stuff I don't always want to save them to home.
For example: it won't be nice having to install let's say for example games, libs etc in the home folder...and having to switch to root to do that each time is not nice either. so basically I only want to be able to write, copy, delete etc to /usr/local/bin and /usr/local/src/ I'm not much concerned about the other directories because I hardly use them.
Thanks for the help...how do I do the chmod though? I don't even know what exactly it is and what you mean...I'm totally new.
Well, first off, know that you can install software to any location you want if you do it by source.
./configure --prefix=/home/user/apps/ make make install
Do you know how Unix permissions work? Basically, chmod is the command that lets you change permissions. If you don't know how the Unix permissions work, let me know, and I'll explain it. Run the command "man chmod" to see chmod's manual.
I have no idea how it works, but I'll try some stuff at home. At the moment I still don't have an internet connection at home...waiting for ISP...
as Cabhan wrote, its not good practice to set write permission for regular users...
Originally Posted by netstrider
Ah, fun stuff. Well, basically, here is how Unix permissions work:
Every file and directory has an owner (a single user) and a controlling group. Therefore, every user on the system falls into one of three categories:
- Controlling Group
Therefore, you can set individual permissions for each group. There are three permissions: readable, writable, and executable. These are represented either with letters (r, w, x) or by numbers (r = 4, w = 2, x = 1). Full permissions for everyone are represented as rwxrwxrwx or 777.
So let's say you have a file called foo. You want foo to have all permissions for the user 'jack', to be readable and executable by all members of the group 'people', and to only be readable by everyone else.
First, we need to set the user and group using the chown utility:
chown jack:people foo
chmod u=rwx foo chmod g=rx foo chmod o=r foo OR chmod 764 foo
chmod u+x <file> # Add executable permission for owner, leaving all other permissions untouched chmod u-x <file> # Remove executable permission for owner, leaving all other permissions untouched chmod ug=rx <file> # Set owner and group to have r-x permissions, leaving the permissions for others as they were chmod +x <file> # Add executable permissions for all three groups
I hope that helps, and feel free to ask more questions.
This is all cool...How do I set multiple permissions though? I want to give, read, write, etc permissions to a single user
At home I did man chmod and screwed up a bit, at least only one directory. Now I can't access it anymore without root. I did this:
chmod -v -o /usr/local/src/
And that set the bits to 0200, which only gave me (-w------)
Which i think is only write access and now I can't read it...
i always use numbers coz its a bit easy for me.
chmod 755 <file>
execute = 1, write = 2 and read = 4.
you could use combinations for permissions. 700... user will have full control... 4+2+1 = 7
755 user(7) = full control, Group(5) = read and execute (4+1) and same for others....
create a new file and try different combinations of chmod xxx <rough file>
I Also have problems with this. I know how chmod works but i still can't copy anything to my external hard-drive however I can open everything. I just wanted to copy an srt-file to it and changed my /media/data/movies/ permission like that
sudo chmod 775 /media/Data/*Code: