Permissions command needs clarifying
Hi,
I've installed my os on a new HD, and it declines me permission to acces my Data dd. I seem to remember I should navigate to the drive and: sudo -R 777 * Could you fill me please? An additional quiry is the failure to recognise my certain password in this specific instance: nnjond@Den-GeForce6100PM-M2:~$ su Password: su: Authentication failure nnjond@Den-GeForce6100PM-M2:~$ ? |
I think you mean "chmod" not "sudo" the commands are very different. run "man chmod" for it's usage and function. You've said nothing about what data this is, what kind of partition, but doing a 777 is usually the very worst way to fix permissions issues, as what you're doing is to just make everything writable by everyone, which is horrible. There's probably a better way if you can give more details.
As for su, that's acking for the root password, not your password. an equivalent which uses *your* password is "sudo -i" assuming your sudoers file is configured to allow this. |
Thanks for your help.
All my files (not sw) are on a second physical hdd, so it doesn't mater if I mess up my os. I'm the only user of my pc so, I imagine 777 is no threat to my peace of mind. If you can advise me on a more standard way of accessing my data drive on /media//, I would be grateful. I hope that answers your questions. |
Quote:
Quote:
Code:
#!/bin/bash |
@ Reply
Hi nnjond,
unSpawn and acid_kewpie are right that you shouldn't be using 777 (Its not about the threat its about how you should set up your system in general) and as said by acid_kewpie I think it is not sudo it should be chmod Also for your other query i.e. when you do su you get authentication failure. Which Linux flavor it is? If it is Ubuntu and you are logging in for the first time then you have reset the root password because Ubuntu does not ask you for root password during installation. Have you ever logged in as root on this machine? Do you remember the root password? If not then reset the root password first :-) |
Thanks for your advice. I'm not sure how to follow it. My Ubuntu os is freshly installed and I haven't tried to alter the permisions. -But I am not permited to alter my files on a second physical hdd as this was established in another setup.
Should I just paste a sequence of the lines into the Bash terminal? I'm not sure where I should begin? |
You're using Ubuntu and according to your post #3, your data drive is in the /media directory but you cannot access the drive of directories on it, correct.
You could post the info you see there so someone could help with whatever changes are needed. Click on the Applications tab at the top left of the Desktop and in the drop-down menu, look for Terminal and click it. Then run this: ls -l /media This should show your directories which should include your second drive as well as whatever their permissions are. |
One of the good things about Ubuntu is that it makes using an external disk easier than other Linux distributions.
You should plug in the drive then on your desktop near the top of the screen you should click on Places. Then you will see a list of directories AND you should see your external disk drive. Just click on the icon for your disk drive. Ubuntu will automatically mount it and it will set the permissions for you. It will also open a file explorer window at the same time. BTW the file explorer in Ubuntu is called Nautilus. |
@ nnjond
Alright for your query regarding authentication failure here is the solution:
http://www.myokyawhtun.com/ubuntu-li...or-ubuntu.html Also read the following: http://www.ubuntux.org/how-to-change...word-in-ubuntu The first link says that by default there is no password set for root user in uBuntu which is not correct. It has been explained in the second link. For your query related to permissions, we will get back on that once you are done with this. |
Is the data drive formatted for NTFS or FAT32? If it is then you can just change the ownership of the mount point or even edit the fstab to grant ownership to your user.
Code:
$ su -c 'fdisk -l' If the drive is EXT[234] or another non-windows partition then maybe changing the ownership rather than permissions would be a better bet? This will change the entire drive ownership Code:
$ su -c 'chown -R <username>:<groupname> <mount point of drive in question>' Hope this helps. |
The procedure below seems to succeed except when I open an .odt doc on the drive in question it is read only and -'is locked for editing by yourself on a different system'
Code:
nnjond@Den-GeForce6100PM-M2:~$ sudo fdisk -l |
fat32! Pfft. so assuming you wish to share this drive with windows machines and the likes, then you can keep it as fat32. However, fat32 is NOT a posix (unix) compliant filesystem. As such, it has no concept of file ownership and access rights in the filesystem itself. Consequently chmod will do nothing. You traditionally need to mount it with "fake" rights - "mount /dev/sdb1 /mnt/my_drive -o umask=000" etc, which wold make all the files world accessible. Under Gnome I'm not really sure what the easy user enhancements are in the GUI world, but just plugging it in should make then fully accessible through Gnome.
|
nnjondk,
acid_kewpie is right. FAT16,32 cannot help you control ownership. If it doesn't cost you any data you may reformat that /dev/sdb1 into a linux format. As a matter of experience MS file systems are a security risk. My advice is always to format every volume into a linux or unix filesystem before using them. Just imagine you issuing an option of umask=0000 ! in the fstab, nothing can be more promiscuous than that: I certainly cannot allow my disk nor my files behave like prostitutes in another hands. Lol (joke). Hope it helps. |
All times are GMT -5. The time now is 04:46 AM. |