LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2009, 09:07 AM   #1
PC_Head
LQ Newbie
 
Registered: Jan 2009
Posts: 12

Rep: Reputation: 0
Formating and changing permissions


Hi. Im very new with Ubuntu 9.04 as i HATE windows. My questions are
1. How do i format a HDD?
2. How can i change the permissions when trying to hide a folder?

I have searched a lot of Linux forums and have tried many different suggestion but none seem to work for me. Like i mentioned, im very new to this, about 4 hours now.

The reason i wish to format 1 of my HDD is so it has Linux format on it and not Windows. When i try to hide a folder, i get the message 'you are not the owner, so you can not change these permissions'. I am the owner and its not 'root'.

I will be greatful for any help.

Thanks in advance.

Last edited by PC_Head; 06-08-2009 at 09:08 AM.
 
Old 06-08-2009, 09:08 AM   #2
PC_Head
LQ Newbie
 
Registered: Jan 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Hi. Im very new with Ubuntu 9.04 as i HATE windows. My questions are
1. How do i format a HDD?
2. How can i change the permissions when trying to hide a folder?

I have searched a lot of Linux forums and have tried many different suggestion but none seem to work for me. Like i mentioned, im very new to this, about 4 hours now.

The reason i wish to format 1 of my HDD is so it has Linux format on it and not Windows. When i try to hide a folder, i get the message 'you are not the owner, so you can not change these permissions'. I am the owner and its not 'root'.

I will be grateful for any help.

Thanks in advance.
 
Old 06-08-2009, 09:10 AM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
1. Install gparted:
Quote:
apt-get install gparted
It's a nice GUI partition manager where you can edit partitions.
2. What exactly do you want to modify with the folder you are talking about?

Last edited by sycamorex; 06-08-2009 at 09:11 AM.
 
Old 06-08-2009, 09:13 AM   #4
PC_Head
LQ Newbie
 
Registered: Jan 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sycamorex View Post
1. Install gparted:

It's a nice GUI partition manager where you can edit partitions.
2. What exactly do you want to modify with the folder you are talking about?
Ok. Where do i write 'gparted' in? Terminal?

I wish to make the folder hidden and password protected upon view.
 
Old 06-08-2009, 09:15 AM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Originally Posted by PC_Head View Post
Hi. Im very new with Ubuntu 9.04 as i HATE windows. My questions are
1. How do i format a HDD?
2. How can i change the permissions when trying to hide a folder?

I have searched a lot of Linux forums and have tried many different suggestion but none seem to work for me. Like i mentioned, im very new to this, about 4 hours now.

The reason i wish to format 1 of my HDD is so it has Linux format on it and not Windows. When i try to hide a folder, i get the message 'you are not the owner, so you can not change these permissions'. I am the owner and its not 'root'.

I will be grateful for any help.

Thanks in advance.
Hi,
1. You can use mke2fs to create an ext2/3 file system on your HDD.
2. chmod can be used to change permissions on files/folders.
Typing
Code:
man mke2fs
and
Code:
man chmod
at the command line will give you information on how to use these programs.
cheers,
jdk
 
Old 06-08-2009, 09:30 AM   #6
PC_Head
LQ Newbie
 
Registered: Jan 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jdkaye View Post
Hi,
1. You can use mke2fs to create an ext2/3 file system on your HDD.
2. chmod can be used to change permissions on files/folders.
Typing
Code:
man mke2fs
and
Code:
man chmod
at the command line will give you information on how to use these programs.
cheers,
jdk
Sorry guys but im just not gettin it at the moment. gparted-how do i install it or is it stand alone? i downloaded it but it wont install.

i found out that by putting a . (dot) infront of the folder name and then pressing Ctrl H, i can hide it from view but i want to hide it so pressing Ctrl H or something will prompt a password. can wfat im asking be done?
 
Old 06-08-2009, 09:48 AM   #7
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
These are all programs that should be already installed on your system. Yes, placing a dot in front of a filename with "make it sort of invisible" but any file manager can be set show all files including hidden ones. They are not very hidden by your method. Changing permissions is more secure.
cheers,
jdk
 
Old 06-08-2009, 10:13 AM   #8
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
If gparted is not installed by default, you need to go to the command line, log in as root (su + password) and type: apt-get install gparted
Then it will appear in the menu.
 
Old 06-08-2009, 10:52 AM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
Quote:
Originally Posted by PC_Head View Post
Hi. Im very new with Ubuntu 9.04 as i HATE windows. My questions are
1. How do i format a HDD?
To format a disk, you can just use mkfs, no need for gparted. You can use gparted if you prefer graphical programs. But there's not much point in doing so, other than aesthetics. To create a filesystem for example using vfat (so you can read it from windows as well) you can do

Code:
sudo mkfs.vfat /dev/<whatever>
Change <whatever> by whatever disk you want to format. This command can be used to see the available disks and partitions.

Code:
sudo fdisk -l
Make sure you don't format the wrong one by error. If you still want to use gparted instead, you need to install it. In Linux, you don't usually go fishing programs around the net to install them. You can use the package manager of your distribution to install anything you need, as someone else pointed out above.

Quote:
2. How can i change the permissions when trying to hide a folder?
There's no such thing as a 'hidden' attribute in Linux. By convention (and only by convention) a file is considered hidden when its name starts with a dot. That way ls and most file managers will not show it unless you instruct them to do so (ls -a, or whatever menu option there's in your file manager to show hidden files).

Describe exactly what do you want to do. By default, no use should be able to see your files unless you grant them permissions to do so. You can use this command over any file or directory to make sure that no other user (but you) is able to read your files or enter your directories:

Code:
chmod go-rwx <whatever file or dir>
In graphical file managers there's usually some kind of dialog (try right click and look at the menu) to set the permissions of a file or group of files and directories. Sometimes after opening such dialog you need to press some kind of "Advanced" tab or button so you can see all the permissions. Just disable all of them for 'group' and 'others', and set whatever you want for 'user'.

Quote:
The reason i wish to format 1 of my HDD is so it has Linux format on it and not Windows. When i try to hide a folder, i get the message 'you are not the owner, so you can not change these permissions'. I am the owner and its not 'root'.
What files are you trying to change the permissions on? If they are not yours you can't change the permissions. That's the intended way, otherwise, permissions would have absolutely no sense, would they?

Root of course can change the ownership and permissions of any file. You should only be changed permissions in the files on your home directory, the rest of the files of your system (i.e. in /etc or /usr or whatever that's not /home) do have a given ownership and permissions for a reason, and changing them could greatly damage your installation to the point of rendering it useless.

Try do describe what exactly do you want to do.

About the password thing, you can't password protect a directory. You could however take another approach, like use a password protected archive on an encripted partition (that you could in turn mount in whatever directory you want).
 
Old 06-08-2009, 10:55 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
Quote:
Originally Posted by sycamorex View Post
If gparted is not installed by default, you need to go to the command line, log in as root (su + password) and type: apt-get install gparted
Then it will appear in the menu.
Just a note, I have no real experience with ubuntu, but according to what I read around everyday, root login is disabled by default, so you would instead do this:

Code:
sudo apt-get install gparted
Or use synaptic or whatever ubuntu uses these days to install software.
 
Old 06-08-2009, 11:15 AM   #11
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
Quote:
Just a note, I have no real experience with ubuntu, but according to what I read around everyday, root login is disabled by default, so you would instead do this:
Yeah, my mistake. I forgot about it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing permissions manuelafl Linux - Newbie 3 02-28-2008 12:32 PM
Changing permissions NomDeGuerre Linux - Newbie 10 03-10-2004 12:55 PM
Changing permissions in 9.2 Jerrac Mandriva 17 12-08-2003 08:36 AM
Changing Many Permissions at Once food188 Linux - General 3 11-02-2003 09:17 AM
Changing Permissions linuxfond Linux - Newbie 11 07-01-2003 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration