LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-08-2014, 01:50 PM   #91
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490

Quote:
Moreover while creating the partitions in the Gparted, in the dialogue box 'Create a new partition' there is an empty box, marked as 'Label'. I could not comprehend what I should fill in there.
That is optional and you can call it what you want or leave it blank.

Quote:
I have problems in trying to do the partitions. In the figure-2 'After making the partitions' we can see that the partitions have been named as 'New partitions 3, 2, and 3'. They have not been given the names like /dev/sda7, dev/sda8 and /dev/sda9. I could not find the option in Gparted, to name them accordingly
The output you have posted from the fdisk command as well as gparted shows you have 65GB of unallocated space. This space is outside the Extended partiiton which is why you are getting the message above. You already have three primary partitions, the sda1 and sda2 for windows and sda4 which is the Extended partition. You can only create one more partition with this setup and that would be sda3. You could create separate sub-directories within this area and set restrictive permissions on the directories.

Another possible option is to resize the Extended partition to include the unallocated space which you will then be able to use to create further logical partitions on which to store data. This is much riskier as not only does the partition have to be resized but all the data has to be moved. The link below to the gparted page indicates that if boot files are on that partition, which in your case they are, the machine may be unbootable. I've never used this option so don't know how well it works.

http://gparted.org/display-doc.php?n...size-partition

If I understand your situation correctly, you don't have anything on the Linux partition(s) and you do have a backup. I think the simplest solution if that is the case is to start over. Do you have a bootable disk, Mint or other OS with gparted on it? That would be the first step, if you don't then download gparted and burn it to a CD. Do you have a windows installation disk in case you need to repair the mbr if things fail? Probably won't need it but it would be good if you have one.

You won't be able to make all the changes you need from gparted installed on Mint so using a bootable medium containing gparted is needed. Use gparted and delete all partitions except the windows partition. Create a partition of the size you want for the Mint filesystem (30GB?). Make this a primary partition and it should be sda3. Create another partition as an Extended partition using ALL the rest of the space on the drive and create the different logical partitions with the sizes you want for each. Make a note of which partition is which size so you have it during the install. You can create these partitions during the install or after the install, doesn't matter as long as you have all the space inside an Extended partition. Install Mint to sda3 and select one of the partitions in the Extended for your 3GB /home and another for swap.

Quote:
Another issue is, how do I give them the appropriate 'mount-points', if I am correct in saying that. In fact those partitions have to be data/user1 and data/user2. How do I do that?
You simply create a directory, as an example: sudo mkdir /mnt/user1_data
You don't NEED to put it under /mnt, that is just a standard location to mount partitions. And no, they do not have to have those specific names. Whatever name you give as a mount point would need to be used in the entry in /etc/fstab to have them mounted on boot. Once this is accomplished, the user could open a file manager and go to the /mnt/user1_data directory and see whatever directories/files are there.
 
1 members found this post helpful.
Old 09-10-2014, 05:52 PM   #92
Anil Kagi
Member
 
Registered: Aug 2014
Distribution: antiX-Frugal
Posts: 155

Original Poster
Rep: Reputation: 0
Thank you yancek,

Quote:
Originally Posted by yancek View Post
The output you have posted from the fdisk command as well as gparted shows you have 65GB of unallocated space. This space is outside the Extended partiiton which is why you are getting the message above. You already have three primary partitions, the sda1 and sda2 for windows and sda4 which is the Extended partition. You can only create one more partition with this setup and that would be sda3. You could create separate sub-directories within this area and set restrictive permissions on the directories.

Another possible option is to resize the Extended partition to include the unallocated space which you will then be able to use to create further logical partitions on which to store data. This is much riskier as not only does the partition have to be resized but all the data has to be moved. The link below to the gparted page indicates that if boot files are on that partition, which in your case they are, the machine may be unbootable. I've never used this option so don't know how well it works.

http://gparted.org/display-doc.php?n...size-partition

If I understand your situation correctly, you don't have anything on the Linux partition(s) and you do have a backup. I think the simplest solution if that is the case is to start over. Do you have a bootable disk, Mint or other OS with gparted on it? That would be the first step, if you don't then download gparted and burn it to a CD. Do you have a windows installation disk in case you need to repair the mbr if things fail? Probably won't need it but it would be good if you have one.

You won't be able to make all the changes you need from gparted installed on Mint so using a bootable medium containing gparted is needed. Use gparted and delete all partitions except the windows partition. Create a partition of the size you want for the Mint filesystem (30GB?). Make this a primary partition and it should be sda3. Create another partition as an Extended partition using ALL the rest of the space on the drive and create the different logical partitions with the sizes you want for each. Make a note of which partition is which size so you have it during the install. You can create these partitions during the install or after the install, doesn't matter as long as you have all the space inside an Extended partition. Install Mint to sda3 and select one of the partitions in the Extended for your 3GB /home and another for swap.
Before going for a repartitioning, I thought of giving the re-sizing option a try. I found that Gparted, which was already pre-installed on the USB live, did not issue any warnings of 'the machine may be unbootable' this time, like it used to do during my earlier installation attempts. So I went ahead and tried the resizing option and to my luck, it worked. The unallocated space that was outside the Extended-partition, was moved, into it and the OS is working fine, without any problems. I am in fact writing this post on that system itself. The current status of the fdisk -l and df -h are as below;

Click image for larger version

Name:	After re-sizing.png
Views:	18
Size:	123.3 KB
ID:	16372

And the Gparted now looks as below;

Click image for larger version

Name:	Gparted after re-sizing.png
Views:	22
Size:	38.5 KB
ID:	16373

Can I continue using this system or do I have to better re-install because some problems may arise, in the future, due to this re-sizing? Are there any chances of problems arising, in the future, due to this re-sizing?

Quote:
Originally Posted by yancek View Post
You simply create a directory, as an example: sudo mkdir /mnt/user1_data
You don't NEED to put it under /mnt, that is just a standard location to mount partitions. And no, they do not have to have those specific names. Whatever name you give as a mount point would need to be used in the entry in /etc/fstab to have them mounted on boot. Once this is accomplished, the user could open a file manager and go to the /mnt/user1_data directory and see whatever directories/files are there.
If I could continue using this system; now I need to create two data partitions and set them up such that they get mounted and are ready to use for the respective users when they log-on, without them, requiring the root password and those partitions are not accessible to other users. Could you please kindly guide me step by step, on how to do that?

Thank you yancek,

Regards

Anil
 
Old 09-10-2014, 06:57 PM   #93
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
I'm glad the resizing option worked as it was the riskiest option. If it is booting and you are able to use it, there should be no reason to reinstall. You as well as the other users will need to bear in mind how small your /home partition is as it can be filled very easily. If you download anything of any size, best move it to the user-data partitions right away. That's the only potential problem I can see, it's unconventional but as long as you are continuously aware of its small size, it should not be a problem in itself.

To create the data partitions you just need to create a directory which will be used as the mount point. This is the first step so if you want a separate partition for each user, you could use the standard location in the /mnt directory using this command:

sudo mkdir /mnt/user1_data

Repeat for user2. You can name them whatever you want, you can create the directory outside the /mnt directory, that is just a standard convention that has been used. You will need an entry also in the /etc/fstab file and you will need the mount point you created (/mnt/user1_data) in the fstab file. Before doing that, create the partitions which you can use GParted to do. The link below is an extremely detailed tutorial and has a separate section on creating new partitions so that should explain it. If i remember correctly, you wanted these user partitions for their personal data to be ntfs so you could access them from windows so bear that in mind. Read carefully.

http://www.dedoimedo.com/computers/gparted.html

When you have that finished, I would suggest that you start a new thread for accessing windows and the permissions and options you need in your fstab file. I have a windows system installed but use it so infrequently I'm not sure I'd be able to advise you on that.

Goog luck and good job so far!
 
1 members found this post helpful.
Old 09-10-2014, 08:16 PM   #94
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
In that second gparted, did you remember to tell it to apply your changes to the disk?

You can obtain an automatic mount by editing /etc/fstab
(Only / and /home are typically filled in automatically when you install your OS).

A Label is an optional name that can be filled in - it may be useful for recognition purposes.

You can specify a partition in one of three ways:-
1. In the way used by gparted
Code:
/dev/sda6
2. By label
Code:
LABEL=abc
3. By UUID
Code:
UUID=a2947a1d-d264-40b6-af9b-ab7dc74122f7
Note:- your system will generate a unique UUID for each partion with a filesystem on it.
You can include comment lines in your /etc/fstab - for example...
Code:
proc	/proc	proc	defaults	0	0
# /dev/sda1
UUID=a2947a1d-d264-40b6-af9b-ab7dc74122f7	/	ext4	rw,errors=remount-ro	0 1
# /dev/sda2
UUID=3f139030-57c3-4d28-9db6-9563fe1de01e	/home	ext4	rw,errors=remount-ro	0 2
# /swapfile
/swapfile					none		swap	sw		0 0
 
1 members found this post helpful.
Old 09-11-2014, 01:33 AM   #95
Anil Kagi
Member
 
Registered: Aug 2014
Distribution: antiX-Frugal
Posts: 155

Original Poster
Rep: Reputation: 0
Thank you yancek,

Quote:
Originally Posted by yancek View Post
I'm glad the resizing option worked as it was the riskiest option. If it is booting and you are able to use it, there should be no reason to reinstall.
I am glad too.

Quote:
Originally Posted by yancek View Post
You as well as the other users will need to bear in mind how small your /home partition is as it can be filled very easily. If you download anything of any size, best move it to the user-data partitions right away. That's the only potential problem I can see, it's unconventional but as long as you are continuously aware of its small size, it should not be a problem in itself.
I will, and ask other users too, to bear that in mind. And I suppose that won't make much of a problem, because I will be changing the default location of the 'Download' folder to the respective 'data/user' partitions. I have done it for my partition in the Firefox preference settings and it is working. The downloaded files are directly sent to my newly created 'Download' folder inside the ntfs 150 GB 'Local disk'. So that may not create much of a problem. We will use the '/home' folder for sharing files between us.

Quote:
Originally Posted by yancek View Post
Before doing that, create the partitions which you can use GParted to do. The link below is an extremely detailed tutorial and has a separate section on creating new partitions so that should explain it. If i remember correctly, you wanted these user partitions for their personal data to be ntfs so you could access them from windows so bear that in mind. Read carefully.

http://www.dedoimedo.com/computers/gparted.html
Thank you for the link. I tried to create the partitions but I had the same problems that I had before [that I posted in the post-#90]. I have given below the screen shots of the Gparted.

Click image for larger version

Name:	Creating partitions.png
Views:	24
Size:	95.0 KB
ID:	16379

In the figure-2 'After making the partitions' we can see that the partitions have been named as 'New partitions 1, 2, and 3'. They have not been given the names like /dev/sda7, dev/sda8 and /dev/sda9. I could not find the option in Gparted, to name them accordingly.

Quote:
Originally Posted by yancek View Post
To create the data partitions you just need to create a directory which will be used as the mount point. This is the first step so if you want a separate partition for each user, you could use the standard location in the /mnt directory using this command:

sudo mkdir /mnt/user1_data

Repeat for user2. You can name them whatever you want, you can create the directory outside the /mnt directory, that is just a standard convention that has been used. You will need an entry also in the /etc/fstab file and you will need the mount point you created (/mnt/user1_data) in the fstab file.
You mean; after creating the '/data/user' partitions for each user, the next step is to create the directory which will be used as the mount point. For that I should issue these following commands in the Terminal, continuously, one after the other;

sudo mkdir /mnt/OD ['OD' is the user-name of one user]

sudo mkdir /mnt/CR ['CR' is the user-name of another user]

And after this, the second step is to make entries in the /etc/fstab file;

What are the entries that I have to make in the /etc/fstab file?

Where is the /etc/fstab file? What is the path to the /etc/fstab file? I opened as the Root, and on the sidebar, there is the 'File system' and in that there is one folder named 'fstb.d', but it is empty. There is a text file named exactly 'fstab'. Do I have to make new entries at the end of that file or do I have to edit the existing entries? [sorry if I am sounding silly, asking these detailed queries but I can't help it, its my ignorance of the system and my paranoia of going wrong again, added to it.]

So once these entries are done, and respective user accounts are created, my system will be ready to use, right?

Please kindly direct me on what I need to do?

Quote:
Originally Posted by yancek View Post
When you have that finished, I would suggest that you start a new thread for accessing windows and the permissions and options you need in your fstab file. I have a windows system installed but use it so infrequently I'm not sure I'd be able to advise you on that.
You mean, after the above procedure, the users will not yet be able to access those partitions from windows OS and for that, separate permissions and options are needed to be entered in the fstab file?

Thank you.

Regards

Anil
 
Old 09-11-2014, 02:13 AM   #96
Anil Kagi
Member
 
Registered: Aug 2014
Distribution: antiX-Frugal
Posts: 155

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by JeremyBoden View Post
In that second gparted, did you remember to tell it to apply your changes to the disk?
Do you mean this;

Click image for larger version

Name:	After creating data partitions.png
Views:	17
Size:	41.5 KB
ID:	16381

Do you mean, the problem I am facing regarding naming of the partitions i.e. they have been named as 'New partitions 1, 2, and 3' and that they have not been given the names like /dev/sda7, dev/sda8 and /dev/sda9, is because I have not told Gparted to to apply the changes to the disk. Once I tell it to apply the changes to the disk, the problem will be solved and the partitions will be appropriately given the names like /dev/sda7, dev/sda8 and /dev/sda9?

Quote:
Originally Posted by JeremyBoden View Post
A Label is an optional name that can be filled in - it may be useful for recognition purposes.

You can specify a partition in one of three ways:-
1. In the way used by gparted
Code:
/dev/sda6
2. By label
Code:
LABEL=abc
3. By UUID
Code:
UUID=a2947a1d-d264-40b6-af9b-ab7dc74122f7
Note:- your system will generate a unique UUID for each partion with a filesystem on it.
You can include comment lines in your /etc/fstab - for example...
Code:
proc	/proc	proc	defaults	0	0
# /dev/sda1
UUID=a2947a1d-d264-40b6-af9b-ab7dc74122f7	/	ext4	rw,errors=remount-ro	0 1
# /dev/sda2
UUID=3f139030-57c3-4d28-9db6-9563fe1de01e	/home	ext4	rw,errors=remount-ro	0 2
# /swapfile
/swapfile					none		swap	sw		0 0
Thank you for the nice explanation on Partition-labels, JeremyBoden. That was very kind of you to give that. It was informative. It added to my meagre knowledge of the Linux systems.

Quote:
Originally Posted by JeremyBoden View Post
You can include comment lines in your /etc/fstab - for example...
Code:
proc	/proc	proc	defaults	0	0
# /dev/sda1
UUID=a2947a1d-d264-40b6-af9b-ab7dc74122f7	/	ext4	rw,errors=remount-ro	0 1
# /dev/sda2
UUID=3f139030-57c3-4d28-9db6-9563fe1de01e	/home	ext4	rw,errors=remount-ro	0 2
# /swapfile
/swapfile					none		swap	sw		0 0
What are comment lines? What is their function?

Thank you for your concern

Regards

Anil
 
Old 09-11-2014, 03:47 AM   #97
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Quote:
Originally Posted by Anil Kagi View Post
In the figure-2 'After making the partitions' we can see that the partitions have been named as 'New partitions 1, 2, and 3'. They have not been given the names like /dev/sda7, dev/sda8 and /dev/sda9. I could not find the option in Gparted, to name them accordingly.
You need to click on the 'Apply' button that is on the top bar (inside Gparted), otherwise the changes will not take effect. It's also a good idea to reboot once Gparted has finished partitioning. Be aware though that I'm not sure how the partitioning will work, since you will be creating new partitions inside unallocated space that is between two other partitions (I usually leave the empty space at the end of the disk). So, I think it's a good idea to wait for more experienced users' advice on this. And as usual, it's advisable to backup your important data before partitioning, just in case something goes wrong.

Quote:
And after this, the second step is to make entries in the /etc/fstab file;

What are the entries that I have to make in the /etc/fstab file?

Where is the /etc/fstab file? What is the path to the /etc/fstab file? I opened as the Root, and on the sidebar, there is the 'File system' and in that there is one folder named 'fstb.d', but it is empty. There is a text file named exactly 'fstab'. Do I have to make new entries at the end of that file or do I have to edit the existing entries? [sorry if I am sounding silly, asking these detailed queries but I can't help it, its my ignorance of the system and my paranoia of going wrong again, added to it.]

So once these entries are done, and respective user accounts are created, my system will be ready to use, right?

Please kindly direct me on what I need to do?

You mean, after the above procedure, the users will not yet be able to access those partitions from windows OS and for that, separate permissions and options are needed to be entered in the fstab file?
The file you need to edit is called fstab and it's inside a directory called etc which is inside your install's parent directory (/). Hence, the name /etc/fstab, with full path included. Before doing any changes to it, could post its contents here? (I'm curious whether Mint uses device names or UUIDs, since it will determine how the /etc/fstab file must be edited). To view its contents you need to issue this command:

Code:
cat /etc/fstab
Also, post the output of the following command (after you create the new data partitions):

Code:
blkid
Regards.
 
1 members found this post helpful.
Old 09-11-2014, 08:01 AM   #98
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
What odiseo77 said, at the top of GParted there is a check mark and if you mouse up to it it will show 'Apply', just click it and you get yet another are you sure message. In the tutorial I linked to in my last post, you can see several images and on his images the word Apply is right below the check mark. Some versions of GParted have the word Apply some don't but I've always seen the check mark.

You can create the new partitions and then create the directory for the mount point or the reverse, should not matter.

Quote:
sudo mkdir /mnt/OD ['OD' is the user-name of one user]
The above command will work. As pointed out above, you can put the directory anywhere and change permissions but putting them in the /mnt directory is a standard convention which is generally used.

The fstab file is a text file and you add entries at the bottom of the file. You won't be able to do anything with that file from a file manager as a regular user. You need root (sudo) privileges to edit it so to open that file you can open a terminal and type: sudo gedit /etc/fstab That should open the fstab file. One thing you may need to replace is 'gedit' as I don't know which text editor is available in your Mint release.


Quote:
You mean, after the above procedure, the users will not yet be able to access those partitions from windows OS and for that, separate permissions and options are needed to be entered in the fstab file?
No, after doing these changes you will be able to access the partitions from Mint. What I was saying is that I don't use windows enough to advise you on what you need to do to access from windows. Also, I'm not sure exactly what entries you would need to limit access so that the second user can't view the files of the first viewer and vice versa. For the second part, it might be a good idea to start a separate thread specifically directed to that point.

The comment lines are informative. In the post above by Jeremy Boden there are 2 lines, the first /dev/sda1 tells what partition corresponds to the UUID in the line immediately below.

Code:
# /dev/sda1
UUID=a2947a1d-d264-40b6-af9b-ab7dc74122f7	/	ext4	rw,errors=remount-ro	0 1
Post the output of the commands suggested above. Also, you might open a terminal and run this command: ls /
You will see all the directories in the / (root) of the filesystem so you will have an understanding of it. You will see bot /etc and /home as well as a number of others.
 
1 members found this post helpful.
Old 09-11-2014, 07:40 PM   #99
Anil Kagi
Member
 
Registered: Aug 2014
Distribution: antiX-Frugal
Posts: 155

Original Poster
Rep: Reputation: 0
Thank you odiseo77,

Quote:
Originally Posted by odiseo77 View Post
You need to click on the 'Apply' button that is on the top bar (inside Gparted), otherwise the changes will not take effect. It's also a good idea to reboot once Gparted has finished partitioning. Be aware though that I'm not sure how the partitioning will work, since you will be creating new partitions inside unallocated space that is between two other partitions (I usually leave the empty space at the end of the disk). So, I think it's a good idea to wait for more experienced users' advice on this. And as usual, it's advisable to backup your important data before partitioning, just in case something goes wrong.
I created the partitions and restarted the system. The partitions have been created and the system is working fine, and the files are intact. I may have to resize the data/user partitions in the future, So I have placed the unallocated-space in between the two data/user partitions.

The following are the screen shots of the Gparted after creating the data/user partitions, the outputs of the 'cat /etc/fstab' and 'blkid' :-

Click image for larger version

Name:	Gparted, fstab & blkid.png
Views:	26
Size:	183.3 KB
ID:	16402

Thank you odiseo77 for your concern.

Regards

Anil
 
Old 09-11-2014, 08:14 PM   #100
Anil Kagi
Member
 
Registered: Aug 2014
Distribution: antiX-Frugal
Posts: 155

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
What odiseo77 said, at the top of GParted there is a check mark and if you mouse up to it it will show 'Apply', just click it and you get yet another are you sure message. In the tutorial I linked to in my last post, you can see several images and on his images the word Apply is right below the check mark. Some versions of GParted have the word Apply some don't but I've always seen the check mark.

You can create the new partitions and then create the directory for the mount point or the reverse, should not matter.
I created the data/user partitions successfully, and they have been appropriately named as dev/sda/7, dev/sda/8 & dev/sda/9.

Quote:
Originally Posted by yancek View Post
The above command will work. As pointed out above, you can put the directory anywhere and change permissions but putting them in the /mnt directory is a standard convention which is generally used.
Fine. I have created the partitions and now I will have to create the directories.

Should I give the below commands now?

sudo mkdir /mnt/OD

sudo mkdir /mnt/CR

Quote:
Originally Posted by yancek View Post
The fstab file is a text file and you add entries at the bottom of the file. You won't be able to do anything with that file from a file manager as a regular user. You need root (sudo) privileges to edit it so to open that file you can open a terminal and type: sudo gedit /etc/fstab That should open the fstab file. One thing you may need to replace is 'gedit' as I don't know which text editor is available in your Mint release.
I just tested to see if it works. The 'gedit' works. The 'sudo gedit /etc/fstab' command opened the fstab file.

Quote:
Originally Posted by yancek View Post
The comment lines are informative. In the post above by Jeremy Boden there are 2 lines, the first /dev/sda1 tells what partition corresponds to the UUID in the line immediately below.

Code:
# /dev/sda1
UUID=a2947a1d-d264-40b6-af9b-ab7dc74122f7	/	ext4	rw,errors=remount-ro	0 1
Thanks for the information.

Quote:
Originally Posted by yancek View Post
Post the output of the commands suggested above. Also, you might open a terminal and run this command: ls /
You will see all the directories in the / (root) of the filesystem so you will have an understanding of it. You will see bot /etc and /home as well as a number of others.
I gave the command 'ls /'. I am posting the output here below;

Click image for larger version

Name:	ls.png
Views:	14
Size:	14.0 KB
ID:	16403

But I don't think I am 'linux-mature' enough to comprehend anything of that.

Thank you yancek

Regards

Anil
 
Old 09-11-2014, 10:31 PM   #101
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
If you haven't yet created the directories for the partition mount point, do that now as posted in your last post.

The ls / command just shows the root directories/files for your system. If you do: ls /home, you will see the user directories, after creating your user data directories you will see them with: ls /mnt It's just informational showing the way the system is laid out.

Next step is to try to set the permissions you want to limit access to your user data partitions.

According to the link below a umask value of 077 for the ntfs user data partition would give you the access you want. You might read the link to get an understanding of it.

http://www.cyberciti.biz/tips/unders...lue-usage.html

The link below gives a pretty detailed explanation of what the various entries in the fstab file mean and has some example entries at the bottom of the page including a sample for an ntfs (windows) partition.

https://help.ubuntu.com/community/Fstab

Last edited by yancek; 09-11-2014 at 10:37 PM.
 
Old 09-12-2014, 12:01 AM   #102
Anil Kagi
Member
 
Registered: Aug 2014
Distribution: antiX-Frugal
Posts: 155

Original Poster
Rep: Reputation: 0
Thank you yancek,

Quote:
Originally Posted by yancek View Post
If you haven't yet created the directories for the partition mount point, do that now as posted in your last post.

The ls / command just shows the root directories/files for your system. If you do: ls /home, you will see the user directories, after creating your user data directories you will see them with: ls /mnt It's just informational showing the way the system is laid out.
I created the directories. This below is what happened. I have some queries. I have expressed them in the attached figure.

Click image for larger version

Name:	Creating directiries.png
Views:	23
Size:	181.9 KB
ID:	16406

Quote:
Originally Posted by yancek View Post
Next step is to try to set the permissions you want to limit access to your user data partitions.

According to the link below a umask value of 077 for the ntfs user data partition would give you the access you want. You might read the link to get an understanding of it.

http://www.cyberciti.biz/tips/unders...lue-usage.html

The link below gives a pretty detailed explanation of what the various entries in the fstab file mean and has some example entries at the bottom of the page including a sample for an ntfs (windows) partition.

https://help.ubuntu.com/community/Fstab
Thank you for the link, yancek. I will go through it.

Regards

Anil
 
Old 09-12-2014, 07:54 AM   #103
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
The below example is what I would try first, bearing in mind that I don't have any partitions with the permissions you want. The second link I posted in my last post gives an explanation of what the specific entries purpose is so read that. The first link is in regard to setting the perissions you want on the user data partitions which are windows/ntfs. I have no idea what will work as I have never set the type of permissions you want for an ntfs partition. The last two characters are the number zero and you need a space between them as well as a space after the umask=002.

Quote:
auto,rw,umask=002 0 0
Here is a copy of the fstab entry I have on a Mint 17 install for swap. Put your UUID inside the quotes after UUID in the example below.

Quote:
UUID=" " none swap sw 0 0
 
1 members found this post helpful.
Old 09-20-2014, 07:11 PM   #104
Anil Kagi
Member
 
Registered: Aug 2014
Distribution: antiX-Frugal
Posts: 155

Original Poster
Rep: Reputation: 0
Hello yancek,

Sorry for the delay in replying. I had to be offline due to some unavoidable circumstances.

Quote:
Originally Posted by yancek View Post
The below example is what I would try first, bearing in mind that I don't have any partitions with the permissions you want. The second link I posted in my last post gives an explanation of what the specific entries purpose is so read that. The first link is in regard to setting the permissions you want on the user data partitions which are windows/ntfs. I have no idea what will work as I have never set the type of permissions you want for an ntfs partition. The last two characters are the number zero and you need a space between them as well as a space after the umask=002.

Here is a copy of the fstab entry I have on a Mint 17 install for swap. Put your UUID inside the quotes after UUID in the example below.
I went through the links but I couldn't comprehend much. The 'auto,rw,umask=002 0 0' command too did not work. However I was able to mount the /mnt/user partitions along with swap partition. Thanks for that. But the two /mnt/user partitions are available to both users. I have not been able to restrict them, neither through the fstab, nor through permission options. I tried to do it on Disk but was not successful.

But I am glad that I have come thus far, with the kind help of everybody. It was a knowledgeable experience discussing with you all guys. Thank you every body. As far as creating the requisite partitions and installation, my problems have been solved. I am marking this thread as solved so that others can take help.

I would appreciate if the restriction problem is solved too.

Thank you every body

Regards

Anil
 
Old 09-20-2014, 11:06 PM   #105
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
I created an ntfs partition a few days ago to test this. Formatted it as ntfs. Put the entry below in the /etc/fstab file for partition sdb13. You will need to replace /dev/sdb13 with the UUID of your specific partition. You will also need to put the actual user name or id after uid=, where it shows user1 below. Obviously, you will also need to change "win-test" below to the actual name of the mount point in the /mnt directory that you created. I also changed ownership of the mount point "/mnt/win-test" to user1 and permissions to 700. I was then able to access read/write as user1 and root, got a permission denied when trying to enter the directory as another user from the file manager and terminal. So creating two fstab entries, one for each users data partition with the entry below should work the way you want.

Quote:
/dev/sdb13 /mnt/win-test ntfs-3g defaults,auto,nouser,uid=user1,rw,umask=077 0 0

Last edited by yancek; 09-20-2014 at 11:11 PM.
 
2 members found this post helpful.
  


Reply



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
Grub & partitioning Necromuru Linux - Software 1 12-22-2007 01:10 PM
Help on Installation / Partitioning grandmarkai Linux - Newbie 2 02-19-2006 08:33 PM
Partitioning for installation trotsky Linux - Newbie 6 12-24-2004 04:54 AM
Partitioning after installation stingerbee Linux - Software 10 08-04-2004 06:55 PM
Partitioning & Type of FS waynevnc Debian 3 06-20-2004 05:34 PM

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

All times are GMT -5. The time now is 03:37 AM.

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
Open Source Consulting | Domain Registration