473,889 Members | 1,444 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use chgrp and chown for a directory ?

296 Contributor
Hello,

Howto change the group and owner of a directory .

I am doing this -->

Expand|Select|Wrap|Line Numbers
  1. chgrp -R groupname directoryname
but its not working .
Feb 14 '07
20 22531
drhowarddrfine
7,435 Recognized Expert Expert
Is 'mount_ntfs' available on Linux?
Feb 15 '07 #11
pankajit09
296 Contributor
Is 'mount_ntfs' available on Linux?
What do you mean by that ?
Feb 16 '07 #12
pankajit09
296 Contributor
Ah, you need to add to your mount command:

-o uid=username gid=groupname

(Replace username and groupname with appropriate real user and group names)


You may also want to use the umask= option too. See the linux man page for mount for more details (there's a section for each filesystem type, search for ntfs by typing '/ntfs').

If you want this configured permanently, you need to add an entry to your system's /etc/fstab file with the parameters you give the mount command, again, man fstab for the details.

hth,
-cybervegan
When I fire the mount command I get this -->

/dev/hda1 on /mnt/win type ntfs (rw,uid=1000,gi d=1000)

My /etc/fstab file has entry like this -->

/dev/hda1 /mnt/win ntfs ro,defaults,use r,umask=0222 0 0

Is everything fine ?
Feb 16 '07 #13
cybervegan
36 New Member
When I fire the mount command I get this -->

/dev/hda1 on /mnt/win type ntfs (rw,uid=1000,gi d=1000)

My /etc/fstab file has entry like this -->

/dev/hda1 /mnt/win ntfs ro,defaults,use r,umask=0222 0 0

Is everything fine ?
Sorry for the delay in responding!

Adding the "user" flag allows ordinary users to mount the device. I'd add gid=grpno too (where grpno is the numeric group number of a group that you want to allow to use /mnt/win - and add all users who should be able to access the windows partition into the relevant group).

hth,
-cybevegan
Feb 20 '07 #14
drhowarddrfine
7,435 Recognized Expert Expert
What do you mean by that ?
I mean is the "mount_ntfs " command/script available on Linux?
Feb 20 '07 #15
arthurzzk
8 New Member
chown -R user_Name:user_ Name directory_Name
chgrp -R user_Name directory_Name
Feb 20 '07 #16
pankajit09
296 Contributor
I mean is the "mount_ntfs " command/script available on Linux?

I don't think becoz when I entered "man mount_ntfs" no result.
Feb 21 '07 #17
pankajit09
296 Contributor
chown -R user_Name:user_ Name directory_Name
chgrp -R user_Name directory_Name
I think this should be correct -->

chown -R owner_name directory_Name
chgrp -R group_name directory_Name
Feb 21 '07 #18
pankajit09
296 Contributor
Sorry for the delay in responding!

Adding the "user" flag allows ordinary users to mount the device. I'd add gid=grpno too (where grpno is the numeric group number of a group that you want to allow to use /mnt/win - and add all users who should be able to access the windows partition into the relevant group).

hth,
-cybevegan

So is this correct -->

/dev/hda1 /mnt/win ntfs ro,defaults,use r,umask=0222,gi d=1000 0 0

How to include all the users ?
Feb 21 '07 #19
cybervegan
36 New Member
So is this correct -->

/dev/hda1 /mnt/win ntfs ro,defaults,use r,umask=0222,gi d=1000 0 0

How to include all the users ?
It works like this:
groupadd winusers
usermod -G winusers fredb
usermod -G winusers bills
usermod -G winusers mayf

hth,
-cybervegan
Feb 21 '07 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

0
7170
by: Fronq | last post by:
Hi ! The entire (PHP-) world seems to have the same problem: Many providers let you upload as one user, lets say "ftpuser", yet then apache and your script will run as another user e.g. "nobody" Allways the same trouble: You would need to chmod your entire website by ftp-client/telnet, to have things like a php-based file-editor work...
2
5749
by: Sean | last post by:
What is meant by: "CHOWN the entire casetracker folder to something that permits the server to write to it, such as apache.apache, or whatever your Webmaster recommends" - is that 700 or 777...Help Sean
4
2597
by: Perttu Pulkkinen | last post by:
I have a form handler script that creates a new folder for the files sent in the form. Move_uploaded_file transfers then puts those files there. But problem is that apache becomes automaticly owner of folder and files, so later I cannot delete/rename/transfer those files trough winscp. Only load them if permissions are set ok. Chown doesn't work, because only superuser can change file's owner. What can I do? Make 24 h agreement with...
4
3544
by: Ed | last post by:
Hello All, I posted earlier about a problem I was having with editing or pasting/deleting files in the "Home Directory" of my web server. I just noticed that the "Home Directory" option in the "Home Directory" tab is grayed out. Why would this be grayed out? Would this be a configuration thing or a permissions thing? I have an administrator account on this server
2
13790
by: Dave Johnston | last post by:
Hi, I'm currently trying to create a wrapper that uses C functions but behaves like ifstream (from fstream.h) - this is because the platform I'm using (WinCE) doesn't support streams and this is the easiest way to take a huge project across onto it. Basically, I've hit a problem. I have no idea how the ifstream class handles directories. In the code I have (which I didn't write), there are several places whereby an ifstream stream is...
3
10067
by: James Colannino | last post by:
Hey everyone. I tried to use os.chown() in the following manner: os.chown('filename', 'username', 'groupname') I got an error, and when I googled for this function I realized that I must pass the numerical uid and gid. My question is, is there a way for me to change ownership based on the name instead of the number? Perhaps there's a function that will let me lookup the uid from the username, and the gid from the groupname?
6
8946
by: Hemant Shah | last post by:
Folks, I need to move HOME directory of an instance to another directory. What is the best way of doing it? Is changing password file enough? or dies DB2 store this info in it's own config? I am running UDB 8.2 on Linux and AIX. Thanks.
6
1744
by: dave | last post by:
I really have 2 questions regarding the following xml snippet. The xml is a directory representation. <?xml version="1.0" standalone="yes"?> <FileSystem> <Row> <ID>1</ID> <Name>Root</Name> <Directory>Root</Directory> <Dir>true</Dir>
6
4267
by: falconsx23 | last post by:
I am trying to write a code for a Phone Directory program. This program is suppose to allow the user to enter a name or directory and then program can either add, save or even delete an entry. Also this program has more then one class and also uses an interface. Right now I am working on ArrayBasedPD class. I am trying to write a code for the remove method (line 158) that allows the user to enter a name, once the program sees that the name is...
0
9961
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11188
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10439
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9603
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6025
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4644
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4249
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3253
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.