08-23-2016
I'm afraid it won't. Smbfs documentation states the mount point most belong to a user for him/her to be able to mount a share without being privileged.
How to Mount a CIFS Share on a Directory You Own (Solaris CIFS Administration Guide)
As already suggested, ACL might help here. You can grant both users the right to get ownership of the directory (write_owner:allow ACL). Before performing the mount, they just need to change it if required and that's it.
Alternatively, you might use sudo to achieve your goal.
This User Gave Thanks to jlliagre For This Post:
10 More Discussions You Might Find Interesting
1. Linux
all the files and directories in my system are owned by root only.i try to(from root loggin) change the permission on the file but not permitted.can any one help to fix my problem .also while installing any software always error occur like no makefile available (1 Reply)
Discussion started by: jop
1 Replies
2. Red Hat
Hi,
I am using redhat AS 3. Recently, I was asked to implement a security control on the OS: to change ownership of /var/log/wtmp to root:sys and permission to 600. However, when I made the change and reboot the machine, everything was reverted. How come? Please help.
The following is the... (1 Reply)
Discussion started by: voa2mp3
1 Replies
3. UNIX for Advanced & Expert Users
Folks,
I have a problem with a particular file, that seems to have some kind of lock on it, that takes around 1 hour approx to timeout. I have used lsof and nothing has an open file handle on it, yet I cannot open it. My user/group owns the file and I can create edit/delete files in... (6 Replies)
Discussion started by: scottrus
6 Replies
4. Shell Programming and Scripting
Hi, all!
Is it possible to use umask and to set the file permission level as 775?
I know I can add chmod into my scripts but I just want to explore the umask option.
Thanks! (1 Reply)
Discussion started by: visio2000
1 Replies
5. Shell Programming and Scripting
I want to change the permission of a file when it gets created in a particular directory. For instance, I have directory MyDir. Everytime a file gets created in that directory, I would like to change the permission to 777.
The context is that I have a 3rd party appication running as root. Only... (2 Replies)
Discussion started by: laiko
2 Replies
6. Shell Programming and Scripting
Here is the sample code I'm trying to execute. I see that the permission on the file is set to 755 always I want to change it to 777. Please help me with this.
code :
#!/usr/bin/perl
use File::Path qw(make_path remove_tree);
my $path = "2010/sam";
make_path($path,{mode=>0777});
... (1 Reply)
Discussion started by: hansini
1 Replies
7. UNIX for Dummies Questions & Answers
I'm trying to setup a directory structure for my staff which enables them full access to files in the directories with their name, and have access to anything in the shared directory. The directory structure looks like this:
root@www10 # ls -l
total 56
drwxr-xr-x 7 internal internal 4096... (3 Replies)
Discussion started by: v_greg
3 Replies
8. UNIX for Advanced & Expert Users
Default file system currently is 664.
I would like to get it as 774.
As other users of the same group was not able execute the file created any any user.
chmod cannot be used in my case. (Files are created and executed the programs owned by different vendors)
we know that umask is not going... (3 Replies)
Discussion started by: deepakwins
3 Replies
9. Shell Programming and Scripting
Hi All,
can some one suggest me a tool to compare file ownership/permission and contents of files located at two different unix servers?
Thanks,
Pranav (1 Reply)
Discussion started by: Pranav Bhasker
1 Replies
10. AIX
Hi.
My example:
I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that
chown -R log_adm /log/*
chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies
LEARN ABOUT DEBIAN
setcifsacl
SETCIFSACL(1) CIFS Access Control List Tools SETCIFSACL(1)
NAME
setcifsacl - Userspace helper to alter an ACL in a security descriptor for Common Internet File System (CIFS)
SYNOPSIS
setcifsacl [-v|-a|-D|-M|-S] "{one or more ACEs}" {file system object}
DESCRIPTION
This tool is part of the cifs-utils suite.
setcifsacl is a userspace helper program for the Linux CIFS client file system. It is intended to alter an ACL of a security descriptor
for a file system object. It is best utilized when an option of cifsacl is specified when mounting a cifs share in conjunction with
winbind facility of Samba suite. Whether a security descriptor to be set is applied or not is determined by the CIFS/SMB server.
OPTIONS
-v
Print version number and exit.
-a
Add one or more ACEs to an ACL of a security descriptor. An ACE is added even if the same ACE exists in the ACL.
-D
Delete one or more ACEs from an ACL of a security descriptor. Entire ACE has to match in an existing ACL for the listed ACEs to be
deleted.
-M
Modify one or more ACEs from an ACL of a security descriptor. SID and type are used to match for existing ACEs to be modified with the
list of ACEs specified.
-S
Set an ACL of security descriptor with the list of ACEs Existing ACL is replaced entirely with the specified ACEs.
Every ACE entry starts with "ACL:" One or more ACEs are specified within double quotes. Multiple ACEs are separated by a comma.
Following fields of an ACE can be modified with possible values:
SID: Either a name or a raw SID value.
type: ALLOWED (0x0), DENIED (0x1), OBJECT_ALLOWED (0x5), OBJECT_DENIED (0x6)
flags: OBJECT_INHERIT_FLAG (OI or 0x1), CONTAINER_INHERIT_FLAG (CI or 0x2), NO_PROPAGATE_INHERIT_FLAG (NI or 0x4), INHERIT_ONLY_FLAG (IO or
0x8), INHERITED_ACE_FLAG (IA or 0x10) or a combination/OR of these values.
mask: Either one of FULL, CHANGE, READ, a combination of R W X D P O, or a hex value
EXAMPLES
Add an ACE
setcifsacl -a "ACL:CIFSTESTDOMuser2:DENIED/0x1/D" <file_name> setcifsacl -a "ACL:CIFSTESTDOMuser1:ALLOWED/OI|CI|NI/D" <file_name>
Delete an ACE
setcifsacl -D "ACL:S-1-1-0:0x1/OI/0x1201ff" <file_name>
Modify an ACE
setcifsacl -M "ACL:CIFSTESTDOMuser1:ALLOWED/0x1f/CHANGE" <file_name>
Set an ACL
setcifsacl -S "ACL:CIFSTESTDOMAdministrator:0x0/0x0/FULL,
ACL:CIFSTESTDOMuser2:0x0/0x0/FULL," <file_name>
NOTES
Kernel support for getcifsacl/setcifsacl utilities was initially introduced in the 2.6.37 kernel.
SEE ALSO
mount.cifs(8), winbindd(8), getcifsacl(1)
AUTHOR
Shirish Pargaonkar wrote the setcifsacl program.
The Linux CIFS Mailing list is the preferred place to ask questions regarding these programs.
cifs-utils 08/19/2011 SETCIFSACL(1)