Samba Share Permissions Issue - Public share with file-stystem permissions only - windows

I'm trying to create a Samba share on a Linux (SLES10) system, but I'm having trouble with the Samba permissions. I want to create this as a public share, with file permissions controlled at the file-system level (so all users can map the drive, but they can only browse further if they have further file-system permissons).
I've been able to create the share, and map to it with any user. The problem is that I only seem able to obtain sufficient permissions if I login as "root". If I login with another user, even if they have permissions to read and write to the underlying folder, I cannot browse that any folders at all.
Here is the share information from /etc/samba/smb.conf:
[sambatest]
comment = Samba Test
public = yes
path = /var/opt/folder
read only = No
writeable = Yes
write list = user1 user2 user3
browseable = Yes
Here is an example of the directory permissions in the shared folder:
drwxrwxr-x 5 user1 group1 40 Nov 4 17:02 .
drwxr-xr-x 11 user1 group1 4096 Oct 20 09:20 ..
drwxrwx--- 4 user1 group1 41 Nov 4 17:02 BASE
drwxrwx--- 6 user1 group1 78 Oct 28 10:11 Files
drwxrwx--- 2 user1 group1 22 Nov 4 17:02 test
After the mapping the drive with the credentials of "user1", I try to browse "test" from Windows XP, but get a message "Z:\test is not accessible: Access is denied".
If I map the same shared folder using the "root" credentials, it works.
Little help? I'm sure I've come across this before, but can't figure out how to fix it...

I think you need to try chmod that dir with 755 and try with this config
[sambatest]
comment = Samba Test
public = yes
path = /var/opt/folder
read only = yes
writeable = yes
write list = user1 user2 user3
browseable = yes
create mask = 0775
More info on:
http://oreilly.com/openbook/samba/book/ch06_02.html
http://www.cyberciti.biz/tips/how-do-i-set-permissions-to-samba-shares.html

Related

How to set permission to a directory with multiple groups with ansible?

I want to set two groups to a directory
app_group
td-agent
If use file module, there is a group attribute can do
- name: Set group to directory
file:
path: /app
group: app_group
state: directory
recurse: true
mode: '0774'
The current permissions like
$ ls -la /app/app1/
drwxrwx---. 5 root app_group 31 Oct 11 14:12 .
drwxr-xr-x. 3 root root 21 May 12 2021 ..
drwxrwx---. 3 app_user app_group 12 Apr 28 13:30 product
But I want to set Fluentd's user group td-group can also read files in /app directory. Like /app/app1/product/001.log. How to do?
If change mode to mode: o+rx, other user can read/execute the directory. Will it change current permission for app_user and app_group?
Since the underlying operating system seems to be Linux, the answer to your question
How to set permission to a directory with multiple groups?
will be you can't do that. At least not in that way. Ansible can configure only what is available.
So you may have a look into the basic concepts of how to manage Linux permissions for users, groups, and others.
In example
Linux group permissions
Granting write permissions to a group to a folder
How does group permissions work?
and maybe put the fluentd user into app_group. An other approach could be introducing Access Control Lists (ACL).
In example
How can I give permissions of files to multiple groups?
Two Groups Separate Permissions, One Directory?

what is the plus (+) in hdfs after the list of rights on a file or folder?

When I execute
hdfs dfs -ls /projects
I get for example a list of folders like this:
drwxrwxr-x+ - user1 group1 0 2020-05-06 09:54 /projects/project1
drwxrwxr-x - user2 group2 0 2020-05-28 09:49 /projects/project2
drwxrwxr-x+ - user3 group3 0 2020-03-12 14:20 /projects/project3
What does the plus in drwxrwxr-x+ mean? The folder /projects/project2 doesn't have ACLs.
Does the plus mean that a folder/file has ACLs defined on it?
You guessed it right. Any file or directory that has an ACL to it will have a + character appended to the permission string.
Ref: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html#ACLs_Shell_Commands

Cannot give myself root my permissions

I am trying to give myself root access to all the file in this folder and not have to sudo everything I want to run a command.
The file I am concerned with is pro
When I enter ls -l I get :
drwxr-xr-x+ 12 Guest _guest 384 13 Jan 14:56 Guest
drwxrwxrwt 9 root wheel 288 13 Jan 14:30 Shared
drwxr-xr-x+ 148 Santi staff 4736 1 Apr 17:13 pro
then I enter chmod 775 pro/
It doesnt seem to change the permssions. What can I do to fix this or why is the folder restricting permission even though I appear to be root?
drwxr-xr-x+ ...
the final + means that the file is governed by acl
see
apropos acl : give you the mans to consult
wikipedia
Access Control Lists on Arch wiki

Use of Group and roles in HDFS

I am new to HDFS,
When i run hadoop fs -ls /tmp/data command , I get the below output
-rw-r--r-- 2 root root 52784 2014-08-01 09:52 /tmp/data/sample1.pdf
-rw-r--r-- 2 root root 52784 2014-08-01 09:52 /tmp/data/Sample2.pdf
From this output i wanna know Which is the Group? and What is the use of the Group ?
Which is the user?
1st root is the user , 2nd root is the group.
Group is used to group all users under it so as to restrict access to hdfs directories based on the groups.

Is it possible to decode a Firefox addon from XPI to XUL?

Is it possible to decode a firefox addon from the XPI binding format to the native language XUL?
I am just trying to learn how to make a addon. So, I think if I can decode a Firefox addon then I can learn addon architecture!
XPI is simply put a ZIP file, so you can just extract its contents and read the files...
Most of the code that you will want to look at is in the extension's chrome directory, usually in a jar file. All you need is a file extractor that can extract zip files. Once you extract the xpi (it's just a zip file with an xpi extension), open the chrome subfolder and see what's there. If it's a jar file, extract it's contents (.jar files are also just zip files with a different extension). From there, there's probably a content folder, which should have most of the xul, css, js, etc.
Just learned there is also xpi-unpack and corresponding xpi-pack in Ubuntu (via sudo apt-get install mozilla-devscripts); seems to take unpacking of both .xpi and included .jar files into account..
Cheers!
Edit: note however, you may have permission problems with xpi-unpack; here's an example command line log I had:
user#PC:Desktop$ xpi-unpack colt.xpi colt-dir
Unpacking colt.xpi
Unpacking ./chrome/colt.jar
Unpacked xpi file.
user#PC:Desktop$ ls -la colt-dir/chrome/colt.jar\!/
total 16
drwxr-xr-x 4 user user 4096 2011-07-05 09:52 .
drwxr-xr-x 3 user user 4096 2011-07-05 09:52 ..
d--------- 2 user user 4096 2010-09-12 05:15 content
d--------- 25 user user 4096 2011-01-08 17:08 locale
user#PC:Desktop$ stat -c '%n %a' colt-dir/chrome/colt.jar\!/
colt-dir/chrome/colt.jar!/ 755
user#PC:Desktop$ stat -c '%n %a' colt-dir/chrome/colt.jar\!/content/
colt-dir/chrome/colt.jar!/content/ 0
user#PC:Desktop$ sudo chmod -R 755 colt-dir/chrome/colt.jar\!/
user#PC:Desktop$ ls -la colt-dir/chrome/colt.jar\!/
total 16
drwxr-xr-x 4 user user 4096 2011-07-05 09:52 .
drwxr-xr-x 3 user user 4096 2011-07-05 09:52 ..
drwxr-xr-x 2 user user 4096 2010-09-12 05:15 content
drwxr-xr-x 25 user user 4096 2011-01-08 17:08 locale
EDIT2: Actually, turns out other files may be lacking permissions too:
user#PC:Desktop$ ls -la colt-dir/
total 28
drwxr-xr-x 4 user user 4096 2011-07-05 09:52 .
drwxr-xr-x 5 user user 4096 2011-07-05 10:04 ..
drwxr-xr-x 3 user user 4096 2011-07-05 10:04 chrome
---------- 1 user user 1337 2011-06-23 00:05 chrome.manifest
drwxr-xr-x 3 user user 4096 2011-07-05 09:52 defaults
---------- 1 user user 1969 2011-06-23 00:05 install.rdf
---------- 1 user user 1275 2010-09-12 05:04 LICENSE.txt
user#PC:Desktop$ stat -c '%n %a' colt-dir/install.rdf
colt-dir/install.rdf 0
... so best to chmod everything: sudo chmod -R 755 colt-dir/ before trying to make changes and pack (as in xpi-pack colt-dir colt-2.xpi)

Resources